By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,641 Members | 2,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,641 IT Pros & Developers. It's quick & easy.

Setting colors to Disabled Controls

P: n/a
DC
Hi All,

When a control is disabled, it is grayed out.
Is there anyway to set a different foreground/background color for disabled
controls (combobox, textbox, etc).

Thanks.
DC
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi,

No.

Ken
-----------------
"DC" <an**@anonymous.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi All,

When a control is disabled, it is grayed out.
Is there anyway to set a different foreground/background color for disabled
controls (combobox, textbox, etc).

Thanks.
DC

Nov 21 '05 #2

P: n/a
DC
Ok.
In that case, is there a way to get the handle of the editable portion of
the combo box.
What I am thinking of is paint the disabled region with a different color,
and draw the combobox string in a contrasting color on the painted
rectangle.
Is this possible.

Regards,
DC
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OA****************@TK2MSFTNGP15.phx.gbl...
Hi,

No.

Ken
-----------------
"DC" <an**@anonymous.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi All,

When a control is disabled, it is grayed out.
Is there anyway to set a different foreground/background color for disabled controls (combobox, textbox, etc).

Thanks.
DC

Nov 21 '05 #3

P: n/a
DC
Any ideas anyone?

"DC" <an**@anonymous.com> wrote in message
news:O6**************@TK2MSFTNGP14.phx.gbl...
Ok.
In that case, is there a way to get the handle of the editable portion of
the combo box.
What I am thinking of is paint the disabled region with a different color,
and draw the combobox string in a contrasting color on the painted
rectangle.
Is this possible.

Regards,
DC
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OA****************@TK2MSFTNGP15.phx.gbl...
Hi,

No.

Ken
-----------------
"DC" <an**@anonymous.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi All,

When a control is disabled, it is grayed out.
Is there anyway to set a different foreground/background color for

disabled
controls (combobox, textbox, etc).

Thanks.
DC


Nov 21 '05 #4

P: n/a
"DC" <an**@anonymous.com> schrieb:
In that case, is there a way to get the handle of the editable
portion of the combo box.


You can use the code in the sample below to get the handle to the 'EDIT'
portion of your combobox:

<URL:http://dotnet.mvps.org/dotnet/faqs/?id=comboboxpasswordchar>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #5

P: n/a
DC
Thanks Herfried.
I'll try the sample and get back - may take some time, but will post here.

Regards,
DC

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ex**************@TK2MSFTNGP10.phx.gbl...
"DC" <an**@anonymous.com> schrieb:
In that case, is there a way to get the handle of the editable
portion of the combo box.


You can use the code in the sample below to get the handle to the 'EDIT'
portion of your combobox:

<URL:http://dotnet.mvps.org/dotnet/faqs/?id=comboboxpasswordchar>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.