Angus,

You should be able to do this with CSS. I'm not looking at the CSS for 
label right now, but something like in XUL:

<label value="My disabled label" disabled="true" id="MyDisLabel"/>

Could be made to look disabled with this in CSS:

label[disabled="true"] {
        color: darkgrey;
}

which would match any label with the disabled attribute set to true...
It is early for me tho, so I think you may want to do some looking into 
the CSS on your own (look in classic.jar for examples)

-Adam

Angus Davis wrote:
> Apparently there is some intrisic style to inputs and selects that makes 
> them "gray out" when their disabled attribute is true. Unfortunately, 
> the same behavior does not apply to labels, at least not in mozilla (it 
> does in IE6). Is this a bug? I have no problems making the label behave 
> as though it is disabled, I just can't make it look like it is disabled. 
> I was wondering, short of writing a whole bunch of my own DOM code, if 
> there would be a way to expect labels to automatically change style 
> based on their enabled/disabled state in the same fashion as other form 
> elements such as inputs and buttons.
> -angus
> 
> 


Reply via email to