Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

Tab Close Button

Each tab can have an optional tab close button. The tab close button can be enabled for each tab using the SftTabsTab.CloseButton property.

Once enabled, the active tab always displays the tab close button. Other tabs only display the tab close button when the mouse cursor is over the tab.

When the user clicks on a tab close button, the TabClicked event occurs with the TabArea argument set to tabareaSftTabsImage2.

Example

Private Sub Form_Load()
    Dim Index As Integer
    With SftTabs1.Direct
        .Tabs.Clear
        For Index = 0 To 20
            Index = .Tabs.Add("Tab " & Index)
            .Tab(Index).CloseButton = True
        Next
        .Tabs.LayoutMode = layoutModeAutoFlow
        .Tabs.Current = 0
    End With
End Sub

Private Sub SftTabs1_TabClicked(ByVal DblClick As Boolean, ByVal TabClicked As Integer, ByVal TabArea As SftTabsLib.SftTabsTabAreaConstants)
    If TabArea = tabareaSftTabsImage2 Then
        SftTabs1.Tabs.Delete TabClicked
    End If
End Sub

Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.