Dimming a static text field

Hi,

I find that setting the enabled property of a static (non-editable) text field to false does not change the visual appearance of the static text (in contrast with editable text, which dims when enabled is set to false.) One way that works is to change the text color from black ({0,0,0}) to light gray = (eg: {30000,30000,30000}). For example, call the AS Studio application “TestApplication”, the name of the window “Main”, and the name of the static text field “SampleText”:


tell application "SampleApplication" to tell window "Main" to tell text field "SampleText" to set enabled to false -- > text does not dim
tell application "SampleApplication" to tell window "Main" to tell text field "SampleText" to set text color to {30000,30000,30000} -- > text dims

Is there is a simpler way to dim static text, similar to making the enabled status of editable text false? Thank you for any help on this.

bmose

Not that I’m aware of.

Side note: There is a list of “developer” colors available in the standard color picker; Useful if you want to change this once in Interface Builder. FYI, “disabledControlTextColor” is {128, 128, 128} (on 0-255 scale).

Bruce,

Thank you for the information. “set text color” is easy enough to do.