CheckBox Control
Creates a check box.
CheckBox
Remarks
A check box is used to switch between three states, True (.T.), False (.F.) and Null (.NULL.).
The three possible states for a check box are determined by the Value property.
Display | Value property |
---|---|
0 or .F. | |
1 or .T. | |
2 or .NULL. |
Setting the Value property to .NULL., or 2, allows the application user to refrain from selecting or not selecting the check box. The check box initially appears selected and dimmed; however, the application user can still clear and then select the check box. You can provide this behavior to allow the application user to decline from selecting the check box. The user can return the check box to the original null state after interacting with the check box by pressing CTRL+0.
The Value property of the check box reflects the data type of the last assignment. If you set the property to True (.T.) or False (.F.), the type is Logical until you set the property to a numeric value. If you set the ControlSource property of the check box to a logical field in a table, the check box is displayed as selected when the value in the current record is True (.T.), as not selected when the value in the current record is False (.F.), and as selected and dimmed if the value in the current record is Null (.NULL.).
Tip If the ControlSource property is a field in a table that does not accept a .NULL. value, then pressing CTRL+0 will generate an error.
Use the Caption property to specify the text that appears next to a check box. Use the Picture property to specify a picture for a check box.
For additional information about CheckBox controls, see Using Check Boxes.
See Also
CheckBox Control Properties, Methods and Events | CREATE CLASS | CREATE FORM | DEFINE CLASS