Toggle Gadgets
- Last UpdatedNov 01, 2022
- 1 minute read
TOGGLE gadgets are used for independent on/off settings as opposed to a radio group. A TOGGLE should be given a tag name or pixmap, which is displayed to the right of the TOGGLE button.
The three TOGGLES are defined by the following lines.
toggle .Bold 'Bold'
toggle .Italic 'Italic'
toggle .Underline 'Underline'
They are named Bold, Italic and Underline, and they are tagged with corresponding text, enclosed in quotes.
More examples:
toggle .Italic 'Italic' AT . . .
toggle .GridOn pixmap /filename callback '!!MyFunction()'
The value of a toggle gadget is set and used via the .val member which is a BOOLEAN value:
!!MyForm. Italic.val = TRUE
if ( !!MyForm.GridOn.val ) then
...
else
...
endif
The default value for a toggle is FALSE.