Setting "Disabled" Appearance

  • Thread starter Thread starter Jeremy S.
  • Start date Start date
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.
 
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.
 
In addition the appearence of a "disabled" control is generally defined by
the underlying OS settings for disabled controls...
 
Back
Top