DesktopCheckBox
From Xojo Documentation
New in 2021r3
The standard checkbox control used by desktop apps.
- For web apps, see WebCheckBox.
Properties | |||||||||||||||||||||||||||||||||
|
Methods | ||||||||
|
Enumerations | |
|
Notes
Checkboxes can have three states:
The Caption text does not wrap. |
Sample Code
The following code in the DesktopCheckBox's ValueChanged event handler checks the value of the CheckBox:
Because DesktopCheckbox is a three-state control, you can use the VisualState property to get and set its value. The DesktopCheckBox.VisualStates Enumeration is designed to get and set the values.
The following code sets the VisualState property of a DesktopCheckBox to Indeterminate.
Because VisualState is an Enumeration, you cannot use the corresponding Integer value for comparison. The following code shows how to use State in a Select Case statement:
Case CheckBox.VisualStates.Unchecked
// The CheckBox is unchecked
Case CheckBox.VisualStates.Checked
// The CheckBox is checked
Case CheckBox.VisualStates.Indeterminate
// The CheckBox state is indeterminate
End Select
See the entries for VisualState and Value for additional examples of setting and getting DesktopCheckBox values. See also the DesktopCheckBox.VisualStates Enumeration.
See Also
DesktopRadioGroup control