HeaderPane
Main
Hide
Share Link
Print

TabSwitchingEventArgs Class

Provides data for the SftTabs.Switching event.

Set Cancel to True to keep the current tab, or TabSwitchingEventArgs.NewIndex to select another tab instead.

Namespace: Softelvdm.SftTabsNET
Assembly: Softelvdm.SftTabsNET

Inheritance

Syntax

public class TabSwitchingEventArgs : System.ComponentModel.CancelEventArgs;
Public Class TabSwitchingEventArgs
    Inherits System.ComponentModel.CancelEventArgs

Constructors

This class cannot be instantiated.

Properties

PublicInherited from System.ComponentModel.CancelEventArgsCancelGets or sets a value indicating whether the event should be canceled.
PublicCurrentIndexThe position of the currently selected tab, or -1.
PublicCurrentTabThe currently selected tab, or null.
PublicNewIndexDefines the position of the tab to select, or -1.
PublicNewTabThe tab about to be selected, or null.

Fields

PublicStaticInherited from System.EventArgsEmptyProvides a value to use with events that do not have event data.

Methods

PublicInherited from System.ObjectEqualsDetermines whether the specified object is equal to the current object.
ProtectedInherited from System.ObjectFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
PublicInherited from System.ObjectGetHashCodeServes as the default hash function.
PublicInherited from System.ObjectGetTypeGets the Type of the current instance.
ProtectedInherited from System.ObjectMemberwiseCloneCreates a shallow copy of the current Object.
PublicStaticInherited from System.ObjectReferenceEqualsDetermines whether the specified Object instances are the same instance.
PublicInherited from System.ObjectToStringReturns a string that represents the current object.

Examples

C# View entire sample code

        }

        private void buttonClear_Click(object sender, EventArgs e) {
            listView1.Items.Clear();
            strLastEvent = "";
            fLastEventDup = false;
        }

        private void sftTabs1_Switching(object sender, TabSwitchingEventArgs e) {
            DumpValues("Switching", e);

            // e.Cancel = true; would keep the current tab
        }

        private void sftTabs1_SwitchingDisabled(object sender, TabEventArgs e) {
            DumpValues("SwitchingDisabled", e);

VB.NET View entire sample code

End Sub

Private Sub ButtonClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonClear.Click
    ListView1.Items.Clear()
    strLastEvent = ""
    fLastEventDup = False
End Sub

Private Sub SftTabs1_Switching(ByVal sender As System.Object, ByVal e As Softelvdm.SftTabsNET.TabSwitchingEventArgs) Handles SftTabs1.Switching
    DumpValues("Switching", e)

    ' e.Cancel = True would keep the current tab
End Sub

Private Sub SftTabs1_SwitchingDisabled(ByVal sender As System.Object, ByVal e As Softelvdm.SftTabsNET.TabEventArgs) Handles SftTabs1.SwitchingDisabled
    DumpValues("SwitchingDisabled", e)

See Also Classes | SftTabs/NET 3.0