0

I have an issue with a combobox. When I save data but the combobox is empty, it should appear in red. Instead, only items of the combo are in red.

Here is the code I used :

lstModGAct.BackColor = Drawing.Color.Red

And here is my combo

enter image description here

Thank you for your help

Pikoh
  • 7,582
  • 28
  • 53
Exarkun
  • 11
  • 4
  • Have a look at [this question](https://stackoverflow.com/q/6468024/579895) The answer is in C#, but should point you to the solution – Pikoh Jul 31 '17 at 08:23
  • Thanks for your answer. I already tried it but it doesn't work as expected. I want the combo to keep that look. I don't want it flat. Maybe there is a way to achieve that – Exarkun Jul 31 '17 at 08:26
  • There´s no way i know of changing the background of the combobox without losing the "3d" effect (maybe creating your own control?). – Pikoh Jul 31 '17 at 08:32
  • Creating my own control is not what is expected by my team. I think I must compromise and lose the 3D effect... Thank you for helping me :) – Exarkun Jul 31 '17 at 08:34
  • Sorry i couldn't help more. Another simple option I can think of is, instead of changing the combobox background, is putting the combo inside a panel a bit bigger than it, and changing that panel background. Easy and I think could work – Pikoh Jul 31 '17 at 08:39
  • It has been validate that we set all comboboxes to flat style, so problem solved :) Again, thank you for your time – Exarkun Jul 31 '17 at 09:57

0 Answers0