HeaderPane
Main
Hide
Share Link
Print

TabByName Property, SftTabs Object

Returns a SftTabsTab object given a tab name.

Syntax

Get

VBSet refTabObj = object.TabByName(ByVal TabName As String) As SftTabsTab

object

A SftTabs object.

TabName

The name of the tab to be accessed.

refTabObj

Returns a reference to the SftTabsTab object.

Comments

The TabByName property returns a SftTabsTab object given a tab name.

The TabByName property returns a SftTabsTab object for the desired tab named TabName. The name of the tab is defined using the Tab.Name property.

The properties of the tab can be updated using the returned SftTabsTab object.

Example

Private Sub Form_Load()
    Dim TabIndex As Integer
    Dim TabObject As SftTabsLib70.SftTabsTab
    With SftTabs1.Direct
        .Tabs.Clear
        TabIndex = .Tabs.Add("First Tab")
        TabIndex = .Tabs.Add("Second Tab")
        .Tab(TabIndex).Name = "ImportantTab"
        TabIndex = .Tabs.Add("Third Tab")
    End With
    TabIndex = SftTabs1.TabByName("ImportantTab").Index
    SftTabs1.Tabs.Current = TabIndex
End Sub

Examples

VB6 View entire sample code

    ' update next/previous button status
    PrevButton.Enabled = (SftTabs1.Tabs.Current > 0)
    NextButton.Enabled = (SftTabs1.Tabs.Current < SftTabs1.Tabs.Count - 1)
    ' here we always enable the tab used to show image states
    ' the tab might be disabled as the user switches away. To insure that
    ' we can switch back, we have to enable it. As the tab may be moved (as
    ' other tabs are inserted, we locate the tab by name instead of its index
    Dim tb As SftTabsTab
    Set tb = SftTabs1.TabByName("ImageSampleTab")
    tb.Enabled = True
End Sub

Private Sub LoadGDIPImgButton_Click()
    ' Load a GDI+ image
    CommonDialog1.Flags = cdlOFNExplorer Or cdlOFNFileMustExist
    CommonDialog1.FileName = ""

See Also SftTabs Object | Object Hierarchy


Last Updated 11/19/2026 - (email)
© 2026 Softel vdm, Inc.