Defines the tab's text.
Get
| VB | Text = object.Text As String |
Put
| VB | object.Text = Text As String |
object
Text
Defines the tab text used for the tab described by object.
The Text property defines the tab's text.
Multi-line tab text can be defined by using CR-LF (carriage return, line-feed) characters.
The tab height and width are automatically adjusted to display the complete tab text and graphic.
Tab controls styles (see Style property) which display tab text using a rotated font (i.e., a vertical tab control) do not support multi-line tab text.
The display and alignment of the tab's text and graphic component can be defined using the Tab.Align property.
Private Sub Form_Load()
Dim TabIndex As Integer
With SftTabs1
.Tabs.Clear
TabIndex = .Tabs.Add("First Tab")
TabIndex = .Tabs.Add("Second Tab")
.Tab(TabIndex).Text = "Second Tab (modified)"
.Tab(TabIndex).ToolTip = "The Second Tab Was Modified"
End With
End Sub
Private Sub SftTabs1_Switched()
With SftTabs1
' The tab page is now active
' Replace the tab picture with the image that shows that
' the page has now been visited
Set .Tab(.Tabs.Current).Image.Picture = Image1(.Tabs.Current)
' Update the form's title
Form1.Caption = .Tab(.Tabs.Current).Text & " Options"
End With
End Sub
Private Sub TabPos_Click()
With SftTabs1.Tab(SftTabs1.Tabs.Current)
If .Align = alignSftTabsRight Then
.Align = alignSftTabsDefault
ElseSee Also SftTabsTab Object | Object Hierarchy