string InsertItem[] = new string[3];
InsertItem[0] = "Text Here 1";
InsertItem[1] = "Text Here 2";
InsertItem[2] = "Text Here 3";
// Set up the color you'd like the row to be
// Im using 100 as an example, these are standard
// RGB color codes
int Red = 100; // Between 0 and 255
int Green = 100; // Between 0 and 255
int Blue = 100; // Between 0 and 255
// Create the object to insert
ListViewItem item = new ListViewItem(InsertItem);
// Set the back ground color of the row
item.BackColor = System.Drawing.Color.FromArgb(Red, Green, Blue);
// Add the row to your list view
YourListView.Items.Add(item);
Im pretty sure that you can use predefined colors rather
then specifying the colors as I did, but this gives u a
wider range of color choices. Hope this helps.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.