Disable ForeColor

  • Thread starter Thread starter Andre
  • Start date Start date
A

Andre

Hi,

Do we have a way to change the text color of a (textbox,
dropdownlist...) when they are at Enable = false.
Because i don't want to have light grey text when they are disabled.

I can use readonly on the textbox, but not with my dropdownlist.

Thank you !
 
Nope, is the short answer. It's disabled. You aren't allowed to muck with
it.
 
It's not possible in IE. For Mozilla and friends you can use:

input[disabled] {
color: #555555;
}

If you *have* to have this kind of thing in IE; then one solution is to create a custom TextBox
class that overrides the render method and generates something that looks like an <input> when the
control is !enabled, but isn't (for example, you could render <span style="border:solid 2px
black;color:#555555">Input Field Text</spa> -- you'd have to tweak the style to get it to your
liking).

Scott
 
Back
Top