# Button text colour change on disable

**URL:** <https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092>\
**Category:** Archived Topics\
**Created:** [April 17, 2009, 2:34pm UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092 "2009-04-17T14:34:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [April 17, 2009, 2:34pm UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092/1 "2009-04-17T14:34:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 17, 2009, 4:20pm UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092/2 "2009-04-17T16:20:26Z")

</div>

hrm, I must be missing something…  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/8287b444a188739227aeb90056826cdb0ffbc4b0.png)

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [April 17, 2009, 4:39pm UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092/3 "2009-04-17T16:39:23Z")

</div>

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:

![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/d5f48f1f92349be17b6e20cdd1fe6aad541339d9.png)

so I will have to animate the button colour myself.

Al

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 17, 2009, 5:43pm UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092/4 "2009-04-17T17:43:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [April 17, 2009, 11:36pm UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092/5 "2009-04-17T23:36:59Z")

</div>

I would use [styles](http://www.inductiveautomation.com/products/factorypmi/usermanual/source/Designer/conceptscompstyles.htm) to bind multiple properties. Check out [this training video](http://www.inductiveautomation.com/support/videos/?category=5&video=27) 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.

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [April 18, 2009, 9:25pm UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092/6 "2009-04-18T21:25:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [April 19, 2009, 2:07am UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092/7 "2009-04-19T02:07:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MadMax](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@MadMax](https://forum.inductiveautomation.com/u/MadMax)\
**Post date:** [July 8, 2011, 8:35pm UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092/8 "2011-07-08T20:35:03Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [July 21, 2011, 10:27pm UTC](https://forum.inductiveautomation.com/t/button-text-colour-change-on-disable/1092/9 "2011-07-21T22:27:14Z")

</div>

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.
