From Xojo Documentation

Revision as of 05:08, 25 January 2022 by Gperlman (talk | contribs) (Notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Boolean )
aDesktopCheckBox.Value = newBooleanValue
BooleanValue = aDesktopCheckBox.Value

New in 2021r3

Supported for all project types and targets.

The boolean value of the checkbox. Setting it to True sets it to checked and False sets it to unchecked.


The DesktopCheckBox is a tri-state control. Changing the VisualState property automatically changes the Value property. Changing the VisualState to Checked or Indeterminate automatically changes the Value to True if it isn't already. See the VisualState property and the VisualStates enum for more information. The ValueChanged event fires when the Value property is changed.

Sample Code

This code is in the ValueChanged event of the checkbox and displays a message box each time the Checkbox is clicked. It reports on whether the the click changes it from True to False or vice-versa.

If Me.Value Then
MessageBox("CheckBox is checked")
MessageBox("Checkbox is unchecked")
End If