Combobox.backcolor dosn't work

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all.

I am setting some color on my combo's:
this.combobox1.BackColor = Colors.White;

This only works when the combobox is enabled.

How can i add color to a disabled combobox?

Lars
 
Lars E. Nes said:
Hi all.

I am setting some color on my combo's:
this.combobox1.BackColor = Colors.White;

This only works when the combobox is enabled.

How can i add color to a disabled combobox?

Lars

AFAIK, you cannot.
 
thats standard behaviour for disabled controls - you could derive your
own and override OnPaintBackground but personally i would stick to the
(ahem) convention.

cp
 
Disable the combobox yourself then using the Disable properties. The user
can choose the combobox but no effect when you change to certain color.

chanmm
 
Excellent.

Solved it by setting a bool Locked to true.
And then added an event when this combobox was entered.

Thanks.
 

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