HeaderPane
Main
Hide
Share Link
Print

Text Property, TabClass Class

Defines the tab's text.

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

Syntax

public new string Text { get; set; }
Public Shadows Property Text As String

Value

The text of the first TextPartClass object in the CellBaseClass.Parts collection. Use an ampersand (&) before a character to define a mnemonic.

The default value is String.Empty.

Comments

Defines the tab's text.

Examples

C# View entire sample code

            item.Selected = true;
            item.EnsureVisible();
        }

        // Tabs are shown with their text instead of their class name
        private string Describe(object value) {
            TabClass tab = value as TabClass;
            if (tab != null)
                return "\"" + tab.Text + "\"";
            return value == null ? "null" : value.ToString();
        }

        private void buttonAdd_Click(object sender, EventArgs e) {
            ++addedTabs;
            TabClass tab = sftTabs1.Tabs.Add("Added " + addedTabs);
            tab.CloseButton = TabCloseButtonOptionalEnum.Always;

VB.NET View entire sample code

    item.Selected = True
    item.EnsureVisible()
End Sub

' Tabs are shown with their text instead of their class name
Private Function Describe(ByVal value As Object) As String
    Dim tab As TabClass = TryCast(value, TabClass)
    If tab IsNot Nothing Then
        Return """" + tab.Text + """"
    End If
    If value Is Nothing Then
        Return "Nothing"
    End If
    Return value.ToString()
End Function

See Also TabClass Class | Classes | SftTabs/NET 3.0