Tab Object

               

A Tab object represents an individual tab in the Tabs collection of a TabStrip control.

Remarks

For each Tab object, you can use various properties to specify its appearance, and you can specify its state with the Selected property.

At design time, use the Insert Tab and Remove Tab buttons on the Tabs tab in the Properties Page of the TabStrip control to insert and remove tabs, and use the text boxes to specify any of these properties for a Tab object: Caption, Image, ToolTipText, Tag, Index, and/or Key. You can also specify these properties at run time.

Use the Caption and Image properties, separately or together, to label or put an icon on a tab.

Use the ToolTipText property to temporarily display a string of text in a small rectangular box at run time when the user's cursor hovers over the tab. To set the ToolTipText property at design time, select the ShowTips checkbox on the General tab, and then in the ToolTipText text box on the Tabs tab, type the ToolTip string.

To return a reference to a Tab object a user has selected, use the SelectedItem property; to determine whether a specific tab is selected, use the Selected property. These properties are useful in conjunction with the BeforeClick event to verify or record data associated with the currently-selected tab before displaying the next tab the user selects.

Each Tab object also has read-only properties you can use to reference a single Tab object in the Tabs collection: Left, Top, Height and Width.