From Xojo Documentation

Property (As Integer )
aDesktopUIControl.TabIndex = newIntegerValue
IntegerValue = aDesktopUIControl.TabIndex

New in 2021r3

Supported for all project types and targets.

The DesktopUIControl's position in the Tab Order. A TabIndex of 0 is the first DesktopUIControl to get the focus.


On macOS, only controls controls where you enter data from the keyboard typically get the focus. In order to manually set focus to controls that don't allow keyboard entry, go to System Preferences, click on the Keyboard icon then on the Shortcuts tab and then check the Use keyboard navigation to move focus between controls checkbox.

Sample Code

This example sets the control's TabIndex.

Me.TabIndex = 2