Disable button upon activation off another button ?
bia@jdm.dk
Posts: 20
Hi
I have a situation where I need to make a button inactiv (grayed out), when i toogle another button.
The situation is that I have two buttons, one for activation of a function and another button for another function.
the second button toggles and alarm installation on and off. Whenever the alarm installation is on, I must secure that button one is not activated....
How is this done the easiest way ?
I have a situation where I need to make a button inactiv (grayed out), when i toogle another button.
The situation is that I have two buttons, one for activation of a function and another button for another function.
the second button toggles and alarm installation on and off. Whenever the alarm installation is on, I must secure that button one is not activated....
How is this done the easiest way ?
0
Comments
I would set a flag in code for the 'button active/inactive' state. Then use the TP commands to set the opacity of the other button depending upon the state.
Here's the code we used. Maybe you can use some parts of it.
Patrick
Normally I would just use the ^SHO command to hide the buttons that weren't necassary but if I was only controlling 1 or 2 devices my GUI page looked lop sided. So in this case I decided to created greyed out button or button with maybe the opacity of 100 on the 1-225 scale that had no channel number assigned at all. Just dead buttons with no functions. On top of them I put the real buttons with channel numbers assigned and the regular on & off states for feedback. Now when the config file is sent at start up the buttons that aren't needed disappear by use of the ^SHO command and reveal the dummy buttons beneath. If I recall if a button that has no opcaity at all it is affectively not there and button pushes on it won't work.
In this situation I felt it was easier to do this then tracking flags and using multi_state bargraphs since I had 54 button (zones) to contend with but otherwise I do like the send_levels to bargraphs approach.