Button state question
udi
Posts: 107
I draw in the TP4 two general buttons (button up, button down) and a multi-state general button with 5 states.
I want that when I press the up button the multi-state button will rise in 1 state level and when I press down it will Decreased in 1 state level.
How can I attach the general buttons to the state button? Can I do it on the TP4 or I need to write a code, if so does anyone have an idea how to do that?
thanks for any help
I want that when I press the up button the multi-state button will rise in 1 state level and when I press down it will Decreased in 1 state level.
How can I attach the general buttons to the state button? Can I do it on the TP4 or I need to write a code, if so does anyone have an idea how to do that?
thanks for any help
0
Comments
Essentially, the only way you can change button states from within the panel is to use the "Command Output" section of button properties to send the ^ANI command to a specific button to change its state. Unfortunately, the ^ANI command only allows you to do a button animation and end on a specific state. There is no "increment up" or "increment down" command, so while you could create 5 buttons to correspond to the 5 different states of your multistate button, you can't really create 2 buttons to scroll through them.
If, on the other hand, your multi state button were a level, you COULD create 2 buttons to cause it to scroll through its level values. However, that depends on exactly what you're trying to make your multi-state button do.
J
This should do the trick, haven't tested it. (don't have a TP handy).
I wouldn't bother with the ^ani command.
To do this completely on the panel, make the center button a multi-state bargraph, as suggested above, and then for the up/down buttons, set them to the same level code as the bargraph. Then set the "level control type" to "relative", and the value to either 1 or -1.
--D
Yea, that's the best route Pretty simple and easily described above. Good luck!
J