JavaScript Editor js editor     Web development 



Main Page

Specifies the tab order of controls on a page and the tab order of forms in a form set. Available at design time and run time.

 [Object.]Control.TabIndex[ = nOrder]

Return Value

nOrder


Specifies the tab order for the control.

Remarks

Applies To: CheckBox | ComboBox | CommandButton | CommandGroup | Container Object | Control Object | EditBox | Form | Grid | Label | ListBox | OLE Bound Control | OLE Container Control | OptionButton | OptionGroup | PageFrame | _SCREEN | Spinner | TextBox

For controls on a form, a tab order is assigned based on the order in which the controls are added. Each new control is placed last in the tab order.

For a form in a form set, a tab order is assigned based on the order in which the form was added. The form with nOrder set to 1 is the first form that is active in the form set. When a user tabs from the last control on a form, the first control on the next form in the tab order gets the focus. If a form is not included in a form set, the TabIndex property is ignored.

You can make changes at design time using the Properties window or at run time using code. However, if you change the TabIndex setting of one control or form, be sure to change the TabIndex setting for all controls on the pages or forms in the form set. If you do not designate a tab order for all controls or forms, Microsoft Visual FoxPro assigns the tab order for the remaining controls and forms based on the order in which they are added and changed at run time, which can produce unintended results.

To ignore the tab order of a control or a form, set the TabStop property to false (.F.).

See Also



JavaScript Editor js editor     Web development