Button text colour change on disable

Currently, when a button is disabled, only its border appearance changes. This is quite a subtle change and it can be hard to see if it is disabled or not.

Normally the text colour of the button would be changed from black to grey when it is disabled. Unfortunately, it is not possible to bind directly against a button’s enabled status, so you have to add a dynamic property, drive it using the same logic as the enabled/disabled status and bind the foreground colour to the dynamic property.

This seems a very long-winded way of carrying out a simple operation. Is there a better / simpler way of doing it?

Al

hrm, I must be missing something…

What you’re missing (because I didn’t tell you :wink: ) is that I’m using HTML to centre the button text and split it over 2 lines. My buttons look like the following:


so I will have to animate the button colour myself.

Al

Ah, yeah, I knew I must be missing something. Yes, HTML formatting does override the built-in disabled foreground color adjustment. Sorry about that - looks like your long winded workaround is going to be your best bet.

I would use styles to bind multiple properties. Check out this training video if you need a refresher.

You can easily copy and paste them between components (quicker than setting up bindings) or even bind them to an SQL query for central management.

Hi Nathan,

This works and would save time for multiple properties. However, you still need to create a dynamic property and set its value using the same expression (in this case) as the ‘enabled’ property. It’s a shame you can’t just bind directly to the enabled property - any reason why you can’t do this?

Al

No good reason. There are much fewer properties exposed as “driving properties” to keep the styles customizer simple (you can create a dynamic property and bind it to any other property to achieve the same effect).

I’ll submit a feature request for you to include “enabled” among the styles list of driving properties. It makes sense to me, especially since component security is based on that.

Any chance the HTML text conflict with component enable/disable is going to be addressed? This has been kicking around for over a year now…

Well, we aren’t making feature improvements to FactoryPMI…

Just in case this thread is in the wrong spot, then the answer is still pretty negative. The way that button works makes it hard to work with the color when HTML formatting is involved.