CheckBox
Object List Hierarchy Next Object
Definition:
A check box gives the user an on/off choice that represents True/False or
Yes/No type of options. The user can select/deselect the box by clicking on it. An
X indicates a selected box, a clear or blank box indicates the box is
deselected.
Icon:
Specialized Features:
The following table lists and describes the properties added by CheckBox. There are no added methods or events.
Properties Use to...
Ctrl3d Enable the 3D effects for the Control.
Value Set or read the state of the CheckBox control.
Event Use to...
Click Perform an action when the user presses and releases a mouse button while on
an object, or when the value of a control is changed in code.
GotFocus Define what occurs when an object is given the focus.
KeyDown Define what occurs when the user presses a key while an object has the focus.
KeyPress Define what occurs when the user presses and releases an ANSI key.
KeyUp Define what occurs when the user releases a key while an object has the focus.
LostFocus Define what occurs when an object loses the focus.
Copied Features:
Properties
Methods
Events
Details:
You can use check boxes in groups to display multiple choices from which the
user can select one or more. Option buttons on the other hand, are mutually
exclusive; you can select only one option button in a group at any one time.
To display text next to a check box, set the Caption property. The appearance
of the text is determined with the Font property. To designate a mnemonic for a
checkbox, include an ampersand (&) in the Caption property text. An ampersand
causes the letter that follows it to be underlined and allows the check box to
be selected by pressing ALT and the underlined character. For example, if you
enter &None for the caption, the caption will appear as "None" and a user can press ALT and "N" to select the checkbox.
To determine the status of the check box, set the Value property. There are
three possible states: unchecked (0), checked (1), and grayed (2). The checked
and unchecked status is reversed each time the box is clicked. The grayed setting
can only be set through code by changing the Value property to 2.