Reputation: 23187
on a ListBox's DrawItem event, I set the background color of each ListBoxItem like so:
g.FillRectangle(new SolidBrush(Color.LightYellow), e.Bounds);
The only problem I'm having now, is after I change the background color, I can't tell when a ListBoxItem with a modified background color is selected. In other words, after a ListBoxItem has a modified background color, when I try to select it, its background color doesn't change to blue to indicated it is selected.
How can I have my cake and eat it too, by having my ListBoxItems with modified backgrounds indicate whether they are selected or not too?
Upvotes: 1
Views: 234