Checkbox 

(System Library)

Description:              This module draws a checkbox with (optional) label.

Returns:                    Nothing

Usage:                       Steady State

Format:                      \System\Checkbox(X1, Y1, X2, Y2, Variable [, Label, BoxOnLeft, Alignment, FocusID])

Parameters:             X1    { numeric }  { required }  { no default: }

                                                Any numeric expression giving the X coordinate on the screen of one side of the checkbox and its label.

                                    Y1    { numeric }  { required }  { no default: }

                                                Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the checkbox.

                                    X2    { numeric }  { required }  { no default: }

                                                Any numeric expression giving the X coordinate on the screen of the side of the checkbox and its label opposite to X1.

                                    Y2    { numeric }  { required }  { no default: }

                                                Any numeric expression giving the Y coordinate on the screen of the top or bottom of the checkbox, whichever is the opposite to Y1.

                                    Variable    { text }  { required }  { no default: }

                                                The variable whose value is toggled by the checkbox.

                                    Label    { text }  { optional }  { default: null string }

                                                An optional parameter that is any text expression to be used as a label with the checkbox. The default value is a blank label.

                                    BoxOnLeft    { Boolean }  { optional }  { default: true }

                                                An optional parameter that is any logical expression; if true (non-0) the checkbox will appear to the left of the label, if false (0) it will be to the right. The default value is true.

                                    Alignment    { numeric }  { optional }  { default: 0 }

                                                An optional parameter that is any numeric expression that sets the alignment of the checkbox and its label according to one of the following options:

Value

Horizontal Alignment

Vertical Alignment

0

Left

Top

1

Right

Top

2

Full

Top

3

Left

Centered

4

Right

Centered

5

Full

Centered

6

Left

Bottom

7

Right

Bottom

8

Full

Bottom

 

                             The default value is 0.

                                    FocusID    { numeric }  { optional }  { default: 1 }

                                                An optional parameter that is any numeric expression for the focus number of this graphic. If this value is 0, the checkbox will display its current setting, but will not be able to be set and will appear grayed out. The default value is 1.

 

Comments:               This module is a member of the System Library, and must therefore be prefaced by \System\, as shown in the "Format" section. If the application you are developing is a script application, the System variable must be declared in APPMOD.SRC and need not be prefaced by a backslash in the function call.

                             The variable must be initialized to 0 or 1 or the checkbox will not be able to be toggled.

                             The size of the checkbox is constant, with X1, Y1and X2, Y2 defining the position of the checkbox and its label.

                             For any optional parameter that is to be set, all optional parameters preceding the desired one must be present, although they may be invalid.

Examples:

System\Checkbox(90, 220, 160, 205 { Location of checkbox },

                visibility { Variable to change }, 

                "Visible Switch" { Label }, 

                0 { Box not on left }, 

                5 { Full, center align }, 

                4 { Focus ID }); 

                System\Checkbox(90, 220, 160, 205 {

                     Location of  checkbox },

                transparency { Variable to change }, 

                "Transparent" { Label }, 

                Invalid { Use default }, 

                0 { Left, top align }); 

{ Use default focus ID } 

See Also:

  DroplistGridList | ListBox | Spinbox