Syntax |
CheckBox X, Y, width, height, title$, .Identifier |
|
Description |
Defines a check box within a dialog box template. |
|
Comments |
Check box controls are either on or off, depending on the value of .Identifier. This statement can only appear within a dialog box template (i.e., between the Begin Dialog and End Dialog statements). The CheckBox statement requires the following parameters: |
|
|
Parameter |
Description |
|
X, Y |
Integer coordinates specifying the position of the control (in dialog units) relative to the upper left corner of the dialog box. |
|
Width, height |
Integer coordinates specifying the dimensions of the control in dialog units. |
|
Title$ |
String containing the text that appears within the check box. This text may contain an ampersand character to denote an accelerator letter, such as "&Font" for Font (indicating that the Font control may be selected by pressing the F accelerator key). |
|
Identifier |
Name by which this control can be referenced by statements in a dialog function (such as DlgFocus and DlgEnable). This parameter also creates an integer variable whose value corresponds to the state of the check box (1 = checked; 0 = unchecked). This variable can be accessed using the syntax: DialogVariable.Identifier. |
|
When the dialog box is first created, the value referenced by .Identifier is used to set the initial state of the check box. When the dialog box is dismissed, the final state of the check box is placed into this variable. By default, the .Identifier variable contains 0, meaning that the check box is unchecked. |
|
Example |
This example displays a dialog box with two check boxes in different states. Sub Main() Begin Dialog SaveOptionsTemplate
36,32,151,52,"Save" |
|
See Also |
CancelButton (statement); Dialog (function); Dialog (statement); DropListBox (statement); GroupBox (statement); ListBox (statement); OKButton (statement); OptionButton (statement); OptionGroup (statement); Picture (statement); PushButton (statement); Text (statement); TextBox (statement); Begin Dialog (statement), PictureButton (statement). |
|
Notes |
Accelerators are underlined, and the accelerator combination Alt+letter is used. |
C |