AcceptFocus property

From Xojo Documentation

Revision as of 14:51, 25 October 2018 by PLefebvre (talk | contribs) (Notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Property (As Boolean )
a<See Below>.AcceptFocus = newBooleanValue
or
BooleanValue = a<See Below>.AcceptFocus

Supported for all project types and targets.

If True, the control will be included in the Tab order and can accept the focus. The GotFocus and LostFocus events are called at the appropriate times.

Notes

Some controls automatically accept focus, e.g. text fields or lists, so they do not have AcceptFocus property.

fa-info-circle-32.png
Not all controls can accept focus on every platform. More information is available on GotFocus and LostFocus events.

Controls implementing the AcceptFocus property

BevelButton New in 2005r1
Canvas
ContainerControl
DisclosureTriangle New in 2005r1
Scrollbar New in 2005r1
UpDownArrows

Sample Code

This code enables the AcceptFocus property. It is in the Open event of the control.

Me.AcceptFocus = True