CheckBox
(System Library)
Description: | Draws a check box with an optional label. |
Returns: | Nothing |
Usage: | Steady State only. |
Function Groups: | Graphics |
Related to: | Bevel | ColorSelect | DropList | DropTree | Edit | GridList | HScrollbar | Listbox | RadioButtons | SpinBox | SplitList | TextBox | ToolBar | VScrollbar |
Format: | System.CheckBox(X1, Y1, X2, Y2, Variable [, Label, BoxOnLeft, Alignment, FocusID, BGColor, FGColor, CheckColorParm, ThreeState]) |
Parameters: |
X1 | ||||||||||||||||||||||||||||||
Required. Any numeric expression giving the X coordinate on the screen of one side of the check box and its label. The smaller of X1 and X2 will always be to the left. | ||||||||||||||||||||||||||||||
Y1 | ||||||||||||||||||||||||||||||
Required. Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the check box. The smaller of Y1 and Y2 will always be the top. | ||||||||||||||||||||||||||||||
X2 | ||||||||||||||||||||||||||||||
Required. Any numeric expression giving the X coordinate on the screen of the side of the check box and its label opposite to X1. | ||||||||||||||||||||||||||||||
Y2 | ||||||||||||||||||||||||||||||
Required. Any numeric expression giving the Y coordinate on the screen of the top or bottom of the check box, whichever is the opposite to Y1. | ||||||||||||||||||||||||||||||
Variable | ||||||||||||||||||||||||||||||
Required. The variable whose value is toggled by the check box. | ||||||||||||||||||||||||||||||
Label | ||||||||||||||||||||||||||||||
Optional. Any text expression to be used as a label with the check box. The default value is a blank label. | ||||||||||||||||||||||||||||||
BoxOnLeft | ||||||||||||||||||||||||||||||
Optional. Any logical expression. If true (non-0) the check box will appear to the left of the label. If false (0) it will be to the right. The default value is true. |
||||||||||||||||||||||||||||||
Alignment | ||||||||||||||||||||||||||||||
Optional. Any numeric expression that sets the alignment of the check box and its label according to one of the following options:
|
FocusID |
Optional. Any numeric expression from 0 to 32767 for the focus number of this graphic. If this value is 0, the check box will display its current setting, but will not be able to be set and will appear grayed out. The default value is 1. |
BGColor |
Optional. Any expression for the background color of the control. No default value. |
FGColor |
Optional. Any expression for the color of the check box label text. No default value. |
CheckColorParm |
Optional color to use for the check mark |
ThreeState |
Optional Boolean flag. If ThreeState is TRUE, then the box is shown as "filled" if Value is anything other than 0 or 1. (Invalid counts as being other than 0 or 1). If Value is Valid and the box is filled, the next click will clear (deselect) the box. If Value is Invalid and the box is filled, the next click will select the box. (place a check mark) |
Comments: |
This module is a member of the System Library, and must therefore be prefaced by \System. as shown in the "Format" section. If your application predates version 11.2, use the backslash notation rather than dot: \System\ If not using ThreeState, the variable must be initialized to 0 or 1. If using ThreeState, you must force the variable to a value other than 0 or 1 in order to achieve the third "filled box" state. Clicking can only transition between selected or deselected. The size of the check box is constant, with X1, Y1and X2, Y2 defining the position of the check box and its label. |
Examples:
System.CheckBox(90, 220, 160, 205 { Location of check box }, Visibility { Variable to change }, "Visible Switch" { Label }, 0 { Box not on left }, 5 { Full, center align }, 4 { Focus ID });
or
System.CheckBox(90, 220, 160, 205 { Location of check box }, Transparency { Variable to change }, "Transparent" { Label }, Invalid { Use default }, 0 { Left, top align }); { Use default focus ID }