Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListView 'cells'

Status
Not open for further replies.

seanbo

Programmer
Jun 6, 2003
407
GB
how can i change the background colour of a subitem in ListView without changing the colour of the whole row? failing that, how can i change the colour of an entire column?

____________________________________________________
If you like a post, show you care by giving it a star.
 
I've noticed that the SubItem's "Add" method supports a forecolor, backcolor, and font.

I cannot get it to work for the life of me, however!!!

So,.. if anyone else can maybe tell me why also(using DETAIL list-view)?
 
AH HA!!!

<ListViewItem>.UseItemStyleForSubItems = false;

So... you can change the full row of &quot;cell&quot; colors by directly referencing the item. Then, you can also change each subitem &quot;cell&quot; by referencing each subitem for their individual colors,BUT the UseItemStyleForSubItems property must be set to false!!!

Not bad for an amatuer..
*pats self on back&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top