Cancels current processing modes.
| VB | object.CancelMode |
object
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.
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 SubSee Also SftTabs Object | Object Hierarchy