Returns a value which determines the control's tab order on the form. Read-only at runtime.
object.TabIndex = [integer]
Where object is an object expression that evaluates to one of the objects in the Applies To list, and integer is the index of the control in the form's tab order.
While the TabIndex property is read-only, it is possible to modify it at design-time by reordering the tab order of controls. The Tab Order panel can be opened by selecting View | Show Tab Order from the main menu or pressing Ctrl + T. This panel displays a list of all the controls in tab order. Once open, you can drag and drop controls into the desired tab order. This panel can also be used as an alternate method of selecting a control on the form. It can also be used to change the z-order of controls on the form (a control that is at the bottom of the tab order collection will appear on top of any control above it).
The TabIndex property can then be used to return the runtime TabIndex property.
The default tab order for any form is the same as the order in which the controls were created.
Modifying a control's tab order changes, not only the order in which users tab through controls on a form (and hence its TabIndex), but also the z-order and FormControlsCollectionIndex of the control you have repositioned and any subsequent controls.
The Tab Index is a zero-based index therefore the first control that the user tabs to will have a TabIndex of 0.
Note Controls that cannot get the focus, as well as disabled and invisible controls, are not included in the Tab order. As you press the TAB key, these controls are skipped.
Setting the TabStop property of a control to False will also prevent a control from being tabbed to.
TabStop property | FormControlsCollectionIndex property
ScrollBar control (control deprecated in version 10.5)
© 2004-2021 looksoftware. All rights reserved.