HeaderPane
Main
Hide
Share Link
Print

Page Property, TabClass Class

The page hosting the controls displayed while the tab is selected.

Class: TabClass
Namespace: Softelvdm.SftTabsNET
Assembly: Softelvdm.SftTabsNET

Syntax

public TabPageClass Page { get; }
Public ReadOnly Property Page As TabPageClass

Value

The page, or null if the control has no client area (SftTabs.ClientArea property) or the tab has not been added to a control.

Comments

The page hosting the controls displayed while the tab is selected.

Examples

C# View entire sample code

            TabClass tab = sftTabs1.Tabs.Add("Added " + addedTabs.ToString());
            tab.CloseButton = TabCloseButtonOptionalEnum.Always;

            // the page of the new tab is created by the control
            Label info = new Label();
            info.Dock = DockStyle.Fill;
            info.Padding = new Padding(12);
            info.Text = "This tab was added by the Add Tab button. Its close button removes it.";
            tab.Page.Controls.Add(info);
            SetPageColors();

            tab.Select();
        }

        private void sftTabs1_DarkModeChanged(object sender, EventArgs e) {
            SetPageColors();

VB.NET View entire sample code

    Dim tab As TabClass = SftTabs1.Tabs.Add("Added " + addedTabs.ToString())
    tab.CloseButton = TabCloseButtonOptionalEnum.Always

    ' the page of the new tab is created by the control
    Dim info As New Label()
    info.Dock = DockStyle.Fill
    info.Padding = New Padding(12)
    info.Text = "This tab was added by the Add Tab button. Its close button removes it."
    tab.Page.Controls.Add(info)
    SetPageColors()

    tab.Select()
End Sub

Private Sub SftTabs1_DarkModeChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SftTabs1.DarkModeChanged
    SetPageColors()

See Also TabClass Class | Classes | SftTabs/NET 3.0