# Combining 2-State Toggle Enable with Indicator styles

**URL:** <https://forum.inductiveautomation.com/t/combining-2-state-toggle-enable-with-indicator-styles/11441>\
**Category:** General Discussion\
**Created:** [March 31, 2016, 2:42am UTC](https://forum.inductiveautomation.com/t/combining-2-state-toggle-enable-with-indicator-styles/11441 "2016-03-31T02:42:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [March 31, 2016, 2:42am UTC](https://forum.inductiveautomation.com/t/combining-2-state-toggle-enable-with-indicator-styles/11441/1 "2016-03-31T02:42:42Z")

</div>

The “Enable” property of a button is great for, well, disabling a button. It looks all nice and grayed out so its clear the button cannot be used, it disables event scripts from running and all that good stuff.

HOWEVER, I’m finding it’s actually quite important to still show the STATE of the button as indicated by the “Indicator Value” property of the button. Unfortunately if the button is disabled, all the foreground and background formatting is overwritten.

Is there a clever way to avoid this?

I’ve made a custom property on the button called [color=#0000FF]“Enable”[/color] which I will bind my enable conditions to. I can use this in the component script to execute the script or not. But then I also need to bind this to the background color etc and it all gets a bit hard. Haven’t used styles much yet, is that perhaps a way to go? Thanks

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [March 31, 2016, 8:34pm UTC](https://forum.inductiveautomation.com/t/combining-2-state-toggle-enable-with-indicator-styles/11441/2 "2016-03-31T20:34:48Z")

</div>

Ended up creating a custom style which affects a bunch of properties like background color, rollover etc. Created a client dataset tag to hold this information, and bound the [color=#0000FF]Style[/color] property of my button to that style tag. Works a treat!
