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?
What you’re missing (because I didn’t tell you ) 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.
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.
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?
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.
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.