HeaderPane
Main
Hide
Share Link
Print

Selected Property, TabClass Class

Defines whether the tab is the selected tab.

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

Syntax

public bool Selected { get; set; }
Public Property Selected As Boolean

Value

True if the tab is the selected tab, otherwise False. Setting the property to True selects the tab; setting it to False has no effect.

Comments

Defines whether the tab is the selected tab.

Examples

C# View entire sample code

                    s += pi.Name + "=" + Describe(pi.GetValue(o, new object[] { })) + " ";
                FieldInfo[] afi = o.GetType().GetFields();
                foreach (FieldInfo fi in afi)
                    s += fi.Name + "=" + Describe(fi.GetValue(o)) + " ";
            }

            ListViewItem item = listView1.Items.Add(new ListViewItem(new string[] { title, s }));
            listView1.SelectedItems.Clear();
            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)

VB.NET View entire sample code

        Dim afi() As FieldInfo = o.GetType().GetFields()
        For Each fi As FieldInfo In afi
            s += fi.Name + "=" + Describe(fi.GetValue(o)) + " "
        Next
    End If

    Dim item As ListViewItem = ListView1.Items.Add(New ListViewItem(New String() {title, s}))
    ListView1.SelectedItems.Clear()
    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

See Also TabClass Class | Classes | SftTabs/NET 3.0