Keep Font Dark on Component When 'Events Disabled'

I have some components. That I have disabled events on. This is working fine and doing what I want it to. However, it now makes the font a light gray. Is there a way to keep it looking as it does when events are enabled. These buttons also contain information about the devices (serial numbers, rack location, etc) and it is now hard to read


On propertyChange of the components, try this. Alternately, put it on the window’s visionWindowOpened to apply to all the components that may get disabled.

if event.propertyName == 'enabled':
	from java.awt import Color
	event.source.setDisabledTextColor(Color(0, 0, 0))

Thanks, doesnt seem to work in the propertyChange though. I would like to have it working there as the object it is a template used throughout the project and I can change it once. I have hundreds of windows that would need to have this added to if visionWindowOpened is required to have it

Make sure you test in a full client, or at least in preview mode in the designer - propertyChange events don’t fire while in design mode.

I tested it in the full client. doesnt seem to work. Can I use this script on the container of the template or do i need to go into each label and specify the color there?

Traceback (most recent call last):
File “event:propertyChange”, line 3, in
AttributeError: ‘’ object has no attribute ‘setDisabledTextColor’

Ignition v7.9.0 (b2016101208)
Java: Oracle Corporation 1.8.0_141

This would have to go into each component that’s getting enabled or disabled - or, if you’re enabling/disabling the container, event.source.setDisabledTextColor(Color(0, 0, 0)) will have to be event.source.getComponent("label").setDisabledTextColor(Color(0, 0, 0))