WinStudio
IWSFormComponent interface
Sets or returns an integer that indicates a component's position in the tab order for a form.
object.TabOrder
Part |
Description |
| object | Required. A reference to a form component object. |
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. |
In the Get syntax, the return value is an integer indicating the current position of the component in the tab order.
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