HeaderPane
Main
Hide
Share Link
Print

TabEventArgs Class

Provides data for events that concern one tab.

Namespace: Softelvdm.SftTabsNET
Assembly: Softelvdm.SftTabsNET

Inheritance

Syntax

public class TabEventArgs : System.EventArgs;
Public Class TabEventArgs
    Inherits System.EventArgs

Constructors

This class cannot be instantiated.

Properties

PublicIndexThe position of the tab in the SftTabs.Tabs collection.
PublicTabThe tab.

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

        // the control paints the pages; the text color of the controls on the pages is the application's
        private void SetPageColors() {
            Color color = sftTabs1.DarkModeActive ? Color.White : SystemColors.ControlText;
            foreach (TabClass tab in sftTabs1.Tabs)
                tab.Page.ForeColor = color;
        }

        private void sftTabs1_TabCloseButtonClicked(object sender, TabEventArgs e) {
            // the control does not remove the tab, the application does
            tabImages.Remove(e.Tab);
            e.Tab.Remove();
        }

        private void sftTabs1_CloseButtonClicked(object sender, EventArgs e) {
            // the control's Close button removes the selected tab in this sample
            TabClass tab = sftTabs1.SelectedTab;

VB.NET View entire sample code

' the control paints the pages; the text color of the controls on the pages is the application's
Private Sub SetPageColors()
    Dim fore As Color = If(SftTabs1.DarkModeActive, Color.White, SystemColors.ControlText)
    For Each tab As TabClass In SftTabs1.Tabs
        tab.Page.ForeColor = fore
    Next
End Sub

Private Sub SftTabs1_TabCloseButtonClicked(ByVal sender As System.Object, ByVal e As Softelvdm.SftTabsNET.TabEventArgs) Handles SftTabs1.TabCloseButtonClicked
    ' the control does not remove the tab, the application does
    tabImages.Remove(e.Tab)
    e.Tab.Remove()
End Sub

Private Sub SftTabs1_CloseButtonClicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SftTabs1.CloseButtonClicked
    ' the control's Close button removes the selected tab in this sample

See Also Classes | SftTabs/NET 3.0