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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top