SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Individual tabs are represented by the object SftTabsTab. The tab index which is usually used to access a specific tab in the control changes as tabs are inserted and deleted, because the tab index simply describes the position of a tab in the tab control.
Using an object reference, it is possible to add a tab and retrieve its SftTabsTab object. Even if the tab's position changes (i.e. its tab index changes) because other tabs are inserted, the SftTabsTab object reference is still valid and can be used to manipulate the tab. Using the Index property, the tab's index can also be retrieved.
Private Sub Form_Load() Dim TabIndex As Integer Dim Tab1Object As SftTabsLib.SftTabsTab With SftTabs1.Direct .Tabs.Clear TabIndex = .Tabs.Add("Tab &1") Set Tab1Object = .Tab(TabIndex) ' save object reference TabIndex = .Tabs.Insert("Tab &0", 0) ' now update 'Tab &1' Tab1Object.Text = "Hello" End With End Sub
If an object is repeatedly manipulated it may be more efficient to save an object reference:
Private Sub Form_Load() Dim TabIndex As Integer Dim Tab1Object As SftTabsLib.SftTabsTab With SftTabs1.Direct .Tabs.Clear TabIndex = .Tabs.Add("Tab &1") Set Tab1Object = .Tab(TabIndex) ' save object reference Tab1Object.BackColor = vbWhite Tab1Object.BackColorActive = vbWhite Tab1Object.ForeColor = vbBlue Tab1Object.ForeColorActive = vbBlue Tab1Object.Text = "Hello" End With End Sub
The above is more efficient than the following, because here the same SftTabsTab object is repeatedly retrieved:
Private Sub Form_Load() Dim TabIndex As Integer Dim Tab1Object As SftTabsLib.SftTabsTab With SftTabs1.Direct .Tabs.Clear TabIndex = .Tabs.Add("Tab &1") .Tab(TabIndex).BackColor = vbWhite .Tab(TabIndex).BackColorActive = vbWhite .Tab(TabIndex).ForeColor = vbBlue .Tab(TabIndex).ForeColorActive = vbBlue .Tab(TabIndex).Text = "Hello" End With End Sub