TabOrder property (WinStudio scripts)

Applies To

IWSFormComponent interface

Definition

Sets or returns an integer that indicates a component's position in the tab order for a form.

Get Syntax

object.TabOrder

  Part   Description
object Required. A reference to a form component object.

Set Syntax

object.TabOrder = integer

  Part   Description
object Required. A reference to a form component object.
integer Required. A reference to an integer indicating the component's position in the tab order.

Remarks

In the Get Syntax, the return value is an integer indicating the current position of the component in the tab order.

Example

Sub Main()
   'Swap the tab order of two components:
   Dim oComponent As IWSFormComponent
   Dim iThisTabOrder As Integer
   Dim iAnotherTabOrder As Integer
   oComponent = ThisForm.Components("comboBox1")
   iThisTabOrder = oComponent.TabOrder
   iAnotherTabOrder = ThisForm.Components("ScriptButton").TabOrder
   Application.ShowMessage("Combo Box 1 = " & iThisTabOrder.ToString() _
      & vbLf & "Script button = " & iAnotherTabOrder.ToString())
   oComponent.TabOrder = iAnotherTabOrder
   ThisForm.Components("ScriptButton").TabOrder = iThisTabOrder
   Application.ShowMessage("Combo Box 1 = " & oComponent.TabOrder & vbLf & _
      "Script button = " & ThisForm.Components("ScriptButton").TabOrder.ToString())
End Sub