CREATES A SYSTEM OBJECT SWITCH1 AND ALLOCATES IT NUMBER N AS REFERENCE
ACTION
The command SWITCH1 N creates a system object SWITCH1, and allocates it a number N. The number N will be used to designate the SWITCH1.
The created SWITCH1 can then be used through the appropriated commands. Its status is read by CHECKED() and the display can be changed by example by CAPTION N,"ON" or CAPTION N,"ON|OFF"
The SWITCH1 is created at position (0,0) : that is TOP = 0 pixel and LEFT = 0 pixel, with dimensions WIDTH = 75 pixels and HEIGHT = 25 pixels.
A SWITCH1 is a mean for the user to trigger an action.
A SWITCH1 can generate the event : ON_CLICK.
Remark : by default, the SWITCH1 is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the SWITCH1.
SYNTAX:
SWITCH1 N
USE ERROR EXAMPLE
rem create a SWITCH1 with default position and dimensions
switch1 1
width 1,210
height 1,100
caption 1, "***ON***|***OFF***"
SWITCH1
SWITCH1 N
SEE ALSO
CAPTION
TOP
LEFT
WIDTH
HEIGHT
FULL_SPACE
ON_CLICK