Setting "Disabled" Appearance

J

Jeremy S.

When I set the .Enabled property of a control to "false", the control then
appears disabled - or "grayed out"

How can I control the appearance of controls that are disabled. For example,
instead of "grayed out" what if I wanted the control to appear bright red,
or pink, or blue - or to appear normal?

Thanks.
 
J

Jeremy S.

Set its Style property.
Set its ReadOnly property.

What if the control does not have a ReadOnly property. In my case I'm
playing with the <asp:CheckBox /> control.

Again, this is mostly for academic curiosity. The other angle here is that
I'm wondering what mechanism actually causes a control's appearance to
become gray in color when disabled. That seems to happen with no explicit
CSS styling involved. Is there some non-css HTML markup that the browsers
look to to determine to "gray out" the control? If I were to know what that
mechanism is, then I would, well, um, no longer wonder what that mechanism
is.
 
P

Patrice

In addition the appearence of a "disabled" control is generally defined by
the underlying OS settings for disabled controls...
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top