📚 SAP Business One SDK Help

TabOrder Property
See Also  Example

Description

The item's tab order, which can be any long integer equal to or greater than 0.

Tab order is the order in which form items get focus when the user presses the TAB key. Only items that can get focus can get a tab order value, for example, you cannot set a tab order for cells or columns.

Two items can have the same tab order, in which case the order is not guaranteed.

Property type

Read-write property

Syntax

Visual Basic
Public Property TabOrder() As Long

Example

Using the TabOrder property (Visual Basic)Copy Code
Private Sub SetTabVertical()
    Dim i, t, diff As Integer
    Dim oEdit As SAPbouiCOM.EditText

    diff = 50

    For i = 20 To 29
        oItem = oForm.Items.Item(i.ToString)
        oEdit = oItem.Specific
        oEdit.TabOrder = i + diff
    Next
End Sub

Private Sub SetTabHorizontal()
    Dim i, t, left, right, diff As Integer
    Dim oEdit As SAPbouiCOM.EditText

    left = 1
    right = 2
    diff = 100

    For i = 20 To 29
        oItem = oForm.Items.Item(i.ToString)
        oEdit = oItem.Specific

            If i < 25 Then
                oEdit.TabOrder = left + diff
                left = left + 2
            Else
                oEdit.TabOrder = right + diff
                right = right + 2
            End If
    Next
End Sub

See Also