Share via


Visual Basic: MSTab Control

TabCaption Property (SSTab Control)

See Also   Example   Applies To

Returns or sets the caption for each tab for an SSTab control.

Syntax

object.TabCaption(tab) [ = text ]

The TabCaption property syntax has these parts:

Part Description
object An object expression that evaluates to an SSTab control.
tab A numeric expression that specifies the tab you want the caption to appear on.
text A string expression that evaluates to the text displayed as the caption for the specified tab.

Remarks

At design time, you can set the TabCaption property by clicking a tab and then setting the Caption property in the Properties window. Or you can select (Custom) in the Properties window and set the TabCaption property in the General tab of the Properties dialog box.

At run time, you can read or change the caption of any tab using the TabCaption property. You can also use the Caption property to change the TabCaption property for just the active tab.

You can use the TabCaption property to assign an access key to a tab. In the TabCaption setting, include an ampersand (&) immediately preceding the character you want to designate as an access key. The character is underlined. Press the ALT key plus the underlined character to make that tab the active tab. To include an ampersand in a caption without creating an access key, include two ampersands (&&). A single ampersand is displayed in the caption and no characters are underlined.