listview backcolour change subitem
I am trying to amend the backcolor property of a 'cell' in a listview table, as each item is added. Dependant on value the default is black on white or;
ListView1.Items(x).SubItems.Add("Samantha", Drawing.Color.Black, Drawing.Color.Yellow, myFont)
Yellow with black text....
but this does not work! No errors just nothing happens
can someone help please?
Richard
Re: listview backcolour change subitem
Each ListViewItem has a property named UseItemStyleForSubItems. This is True by default, meaning that each subitem has the same style as the item itself. If you want to be able to style the subitems independently then you must set that property to False. Note that it is per item, not once for the whole control.