See TOGGLEBUTTON Widget for an example program that generates a TOGGLEBUTTON widget with a display similar to that shown above. For this program, when you click on the TOGGLEBUTTONs, the LABEL section reflects the VALUE.
NOTE
See the following programs for other examples using the TOGGLEBUTTON widget:
The TOGGLEBUTTON widget is used to input or display binary data. Clicking the mouse button (or pressing the Spacebar or theReturn key) while the focus is on the TOGGLEBUTTON causes a CHANGED event to be generated.
The TOGGLEBUTTON widget is similar to the PUSHBUTTON widget in that when you click on the widget, an event is generated. The TOGGLEBUTTON is useful for emulating a two-position switch, or for setting a mode of operation.
For the TOGGLEBUTTON widget, the event is called CHANGED and theTOGGLEBUTTON VALUE attribute is toggled between 0 and 1 every time you click on the widget. A small box changes highlighting to reflect the value. The default is 0.
Events
Events for the TOGGLEBUTTON widget are:
·
CHANGED
·
SYSTEM MENU
CHANGED
This event is generated when the user "presses" the TOGGLEBUTTON either by clicking on it with the left mouse button or by pressing the Spacebar or the Return key.
SYSTEM MENU
This event is generated when the operator selects items from the SYSTEM MENU.