SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
A new tab was clicked and is about to become active.
VB | Private Sub object_TabClicked(ByVal DblClick As Boolean, ByVal TabClicked As Integer, ByVal TabArea As SftTabsTabAreaConstants) |
object
A SftTabsEvents object.
DblClick
True if a mouse button double-click occurred, False if the mouse button was clicked once.
TabClicked
The zero-based index of the tab that was clicked.
TabArea
Describes the area within the tab that was clicked.
Name | Value | Description |
---|---|---|
tabareaSftTabsTab | 0 | Tab - The tab was clicked, but outside the text or image portion of the tab. |
tabareaSftTabsText | 1 | Text - The text portion of the tab was clicked. |
tabareaSftTabsImage | 2 | Image - The image portion of the tab was clicked. |
tabareaSftTabsImage2 | 3 | Image2 - The second image portion of the tab was clicked. The second image is used to implement tab close buttons, which generate the TabClicked event with a TabArea argument of tabareaSftTabsImage2. |
The TabClicked event occurs when a new tab was clicked and is about to become active. Tab switching only occurs in response to the left mouse button.
While handling the TabClicked event, the application can suppress any further handling of the mouse click event by calling the CancelMode method. This suppresses the subsequent Switching and Switched events and prevents tab switching.
This example adds a checkbox to the second tab. Clicking on the checkbox doesn't change the active tab (because of the call to CancelMode), but toggles the checkbox instead.
Private Sub Form_Load() With SftTabs1.Direct .Style = styleSftTabsModernTop .Tab(1).Image.Appearance = sftImageCheckboxNo End With End Sub Private Sub SftTabs1_TabClicked(ByVal DblClick As Boolean, ByVal TabClicked As Integer, ByVal TabArea As SftTabsLib.SftTabsTabAreaConstants) With SftTabs1.Direct If TabArea = tabareaSftTabsImage Then If .Tab(TabClicked).Image.Appearance = sftImageCheckboxNo Then .Tab(TabClicked).Image.Appearance = sftImageCheckboxYes .CancelMode ElseIf .Tab(TabClicked).Image.Appearance = sftImageCheckboxYes Then .Tab(TabClicked).Image.Appearance = sftImageCheckboxNo .CancelMode End If End If End With End Sub
See Also SftTabsEvents Object | Object Hierarchy