TCPmaker : Visual Tour TCPmaker Screen Controls |
Both the Pushbutton and the LED Indicator control classes have a Radio Button mode, that works like buttons on a car radio (and the similar kind of control group that is commonly used in Graphical User Interfaces in operating systems like Windows, MacOS, X-Windows, and many more).
In this mode, buttons are grouped together, and when a button in the group is clicked, that button goes "down" or to the "active" state, and all the other buttons must go "up" or to the "inactive" state.
Here's how to set up and use Radio Mode:
Example:
Create an Integer Variable. Let's say its name = ButtonNum and its id="iv0".
Create 3 Pushbutton controls, all having m = Radio, and all having i = "iv0".
Create 3 LED Indicator controls, all having i = "iv0".
Set rb = 1 for the first button in the group, rb = 2 for the second button, and rb = 3 for the third button.
Set rb = 1 for the first LED in the group, rb = 2 for the second LED, and rb = 3 for the third LED.
Resulting Behavior:
When you set the value of variable ButtonNum (id="iv0") to 2, the second Pushbutton changes to its Active state, and the second LED Indicator also changes to its Active state.
When you click on the first button, the value of ButtonNum is changed to 1 and sent to the micro device. The first Pushbutton and the first LED become Active, and the second Pushbutton and second LED become Passive or inactive.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |