Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

SftTabs.CancelMode Method

Cancels current processing modes.

Syntax

VBobject.CancelMode

object

A SftTabs object.

Comments

The CancelMode method cancels current processing modes.

Applications may wish to respond to events such as MouseDown, TabClicked. Many mouse related events may have built-in functions which may be started after these events are processed. If an application wants to suppress the built-in behavior, e.g. to display a context menu, the internal state of the control has to be cleared. This can be accomplished using the CancelMode method.

Example

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 SftTabs Object | Object Hierarchy


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