c# - How do I make the items in a ListView a different color? -


I have ListView full of ListViewItems.

I want to emphasize some of them when a certain event is fire, so I want to change the color of the list other than black color (will be red color).

Is it possible to change the colors of objects by dynamically by default?

>

The color of the list view is straight forward:

  ListViewItem li = new ListViewItem (); Li.Forecolor = Color.Red; Li.Text = "sample"; ListView1.Items.Add (Lee);  

Change the background color of the list view only listView1.BackColor = Colors.Red;

Modifying an item in the ListView:

  foreach (see ListViewItem li in list 1) {if (li.Text = "sample") { Li.Forecolor = Color.Green; }}  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -