BackColor in ComboBox items

  • Thread starter Thread starter Geir Sanne
  • Start date Start date
G

Geir Sanne

hi!!!

is it possible to set the backcolor to red of the items in a combobox
and make the combo itself be white as it is default ?

when i set combobox.backcolor i set both combox backcolor and combobox
items backcolor.

-Geir
 
Hi Geir,

I haven't tested it, but you may be able to do it by setting OwnerDraw and
DropDown (not list).
If you have DropDownList you will get an event to paint the item in the
TextBox. This would be the selected item, so if your selected item has a
white background you will be ok.

Happy Coding!
Morten Wennevik [C# MVP]
 
Back
Top