RectControl.Enabled

From Xojo Documentation

Property (As Boolean )
aRectControl.Enabled = newBooleanValue
or
BooleanValue = aRectControl.Enabled

Supported for all project types and targets.

Determines if the control should be enabled when the owning window is opened.

Notes

A disabled control cannot be clicked and cannot receive the focus.

Example

This example disables the control. Its caption is grayed out.

Me.Enabled = False