Author Topic: ComboBox Background Colour  (Read 3600 times)

0 Members and 1 Guest are viewing this topic.

mr_nick

  • Guest
ComboBox Background Colour
« on: February 11, 2009, 04:24:17 AM »
Is there any way of altering the background colour of a combobox or making it stand-out in any way? I have a form with multiple combo boxes on it and when a user clicks the OK button I want to verify that each box has had a valid selection made and if there are any invalid ones, to highlight them in some way rather than the user having to check each and every box.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ComboBox Background Colour
« Reply #1 on: February 11, 2009, 05:10:12 AM »
Can't set the combobox color.

One way to draw the eye to the offending control is to design the control with a picturebox behind ( slightly larger than the control and with a dominant color fill.
The picture box will normally have the visible property set to false ...
.. you can programattically set the visability property to true as a visual notifier.

regards
kdub
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ComboBox Background Colour
« Reply #2 on: February 11, 2009, 05:17:02 AM »
like this piccy attachment
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

mr_nick

  • Guest
Re: ComboBox Background Colour
« Reply #3 on: February 11, 2009, 06:55:27 AM »
Thanks for the idea - does pretty much what I need.
« Last Edit: February 11, 2009, 07:31:05 AM by mr_nick »