I’m working with some legacy code and need to change the background color of a row (and the font color) in a ListView in VB6 based on some criteria. I need to change the color of the row when the row is selected and not selected. I can change the font color of a non-selected row via the .Foreground property but I can’t change the color in any of the other scenarios.
Share
The background color of selected rows is controlled by the system. You cannot change it to anything else.
If you have to be able to change the background of the selected rows, you will need to custom draw the listview — which, to be honest, is too much of a pain to seriously consider 🙂