IControl.TabOrder

Syntax

TabOrder: Integer;

Description

The TabOrder property determines a component position in a tab order.

Comments

The tab order is an order, in which the focus is switched between form components, when the user presses the TAB key. If TabOrder = 0, this component should be in focus during the first appearance of the form on the screen.

Initially, the tab order corresponds to the order, in which the components were placed on the form. The first component has the TabOrder value that is "0", the second is "1", and so on.

NOTE. There is a direct correlation of the value of the TabOrder property and z-order of the components (the display order of the overlapped components). The components with the least value of TabOrder within one parent component are placed at the bottom. The components with the largest value of TabOrder are placed under all other components. On changing the positions of components in the form design mode using such commands of the context menu as Bring to Front and Send to Back, the value of the TabOrder property is changed automatically. The z-order is controlled with operating system mechanisms in the form execution mode. To avoid discrepancy in the visual interface of the formed application, it is not recommended to overlay components, or, depending on the case, to hide particular components by using the Visible property in the application code.

See also:

IControl | IControl.TabStop