16,020,622 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by xirokx (Top 14 by date)
xirokx
25-Jul-14 20:55pm
View
Deleted
thanks for your reply
regretably your solution permanently fixed the background colour as per the colour specified.
the way it works is:
- create a folder in res called drawable
- place a file called hover.xml inside that folder
- set the onstate, selected and other properties to a colour of your choice
- link to this folder in your activity_main file i.e. android: list_selector ="drawable/hover"
and it works a treat :-)
thanks for your response
xirokx
23-Jul-14 16:44pm
View
thanks
list.setOnItemClickListener(new OnItemClickListener(){
public void onItemClick(AdapterView<!--?--> parent, View view, int position, long id){
view.setBackgroundColor(Color.CYAN);
}
});
thats my code
when I click, the list item background color changes to CYAN
however the list item remains as CYAN after my click and I just want it to show CYAN on click and its default colour which is black when its not being clicked.
Basically, I am trying to implement a rollover on a list item, on click change color to cyan then change to default color.
any ideas how i can acheive this?
thank
xirokx
22-Jul-14 5:11am
View
Ahh, to solve this I went into Form1.Designer.cs file and removed the line:
this.dataGridView1.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dataGridView1_RowsAdded);
I then added the same line to my Form1.cs file, which checks for new records NOT when the form loads but every 4-5minutes afterwards and alerts user if new records have been added.
Thanks for your help, really appreciate it.
xirokx
22-Jul-14 3:45am
View
public partial class Form1 : Form
{
Timer timer = new Timer();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.CarUpdateTableAdapter.Fill(this._SAC_OTPDataSet.CarUpdate);
this.dataGridView1.Sort(this.dataGridView1.Columns[18], ListSortDirection.Descending);
dataGridView1.AutoResizeColumns();
timer.Interval = 60000;
timer.Tick += new EventHandler(UpdateDataGridView);
timer.Start();
}
private void UpdateDataGridView(object sender, EventArgs e)
{
this.CarUpdateTableAdapter.Fill(this._SAC_OTPDataSet.CarUpdate);
}
private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
MessageBox.Show("New Cars Added:");
}
}
okay so my code looks like this....
On Form Load the messageBox is first shown 4-5 times, even if its not adding new records so I keep pressing accept to see datagridview. This is not how it should work.
My aim is for a messageBox to be displayed ONLY when the datagridview is refreshed as the database it gets its values from is updated every 5-6mins and sometimes there is new data and sometimes not. In the event there is new data I would like a messagebox to show up.
Please can you correct my code to enable this to happen?
Thanks in advance
xirokx
21-Jul-14 9:06am
View
thanks for your response,
where in my code do I place your method?
surely I have to check first if rows are being added and only call your method if new rows are being added?
pls clarify
thanks
xirokx
19-Jul-14 23:04pm
View
thanks but I have it working now :-)
xirokx
10-Jul-14 16:55pm
View
anyone?
xirokx
10-Jul-14 7:47am
View
whats best practice?
to store the mp3 file itself? or to save a weblink that retrieves it?
thanks
xirokx
10-Jul-14 7:46am
View
thanks for recommendations....
well whats the best way to store them?
my c# program allows user to click on the link and the mp3 opens up and streams and plays.
is it better for me to store the mp3 in my database?
or can i store them elsewhere (somehow???) and generate a weblink that I can store inside sql server field that retrieves them?
please kindly help
thanks
xirokx
8-Jul-14 11:20am
View
awesome....thanks alot
xirokx
8-Jul-14 10:55am
View
thanks I got it in the end...
xirokx
8-Jul-14 9:49am
View
thanks guys
xirokx
8-Jul-14 9:14am
View
fair enough...
xirokx
8-Jul-14 7:02am
View
I know OriginalGriff solution works...
But now I have a different prob, see above...see solution 3 I edited it
Show More