Returns the tab index of the first visible tab.
Get
| VB | TabIndex = object.VisibleTab As Integer |
object
TabIndex
Returns the zero-based index of the first visible tab in a scrollable tab control.
The VisibleTab property returns the tab index of the first visible tab.
The VisibleTab property only applies to scrollable tab controls. The VisibleTab property returns the index of the first tab that is completely visible. All other tabs with a smaller tab index have scrolled off the edge of the control and are currently not visible to the user. This is not the same as a hidden tab (see Tab.Visible property). A hidden tab is a tab that cannot be made visible by the end-user.
The Scrolling.LeftButton and Scrolling.RightButton properties can be used to determine if scrolling in a given direction is possible. The Scrolling.Scroll method is used to scroll a tab control under application control.
If scrolling is not enabled, this property cannot be used.
Else
' we're not over a tab
Image1.Top = -1000
Image1.Left = -1000
Effect = vbDropEffectNone
End If
DropTabIndex = TargetTab
' scroll the tabs (if needed)
If TargetTab = SftTabs1.Scrolling.VisibleTab Then
' we're over the first visible tab, scroll left
Direction = directionSftTabsLeft
ScrollTimer.Enabled = True
ElseIf SftTabs1.Width - 500 < x Then
' we're near the right edge of the control
Direction = directionSftTabsRight
ScrollTimer.Enabled = TrueSee Also SftTabsScrolling Object | Object Hierarchy