HTBasic Help
×
Menu
Index

Togglebutton Widget

 
_______________________________________________________
TOGGLEBUTTON Widget
Inputs or displays binary data
_______________________________________________________
 
Legal Usage                Level-0 Widget:                Yes
                 Parent to:                None
                 Child of:                        PANEL
 
Example Image
 
     
 
Example Program
 
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:
 
         Alarm Clock
         Bomb Squad (*LOAD)
 
Attributes
 
See TOGGLEBUTTON Widget Attributes for the TOGGLEBUTTON widget attribute list.
 
Remarks
 
The TOGGLEBUTTON widget is used to input or display binary data. Clicking the mouse button (or pressing the Spacebar or the Return 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.