TabStrip Control

A TabStrip control is like the dividers in a notebook or the labels on a group of file folders. By using a TabStrip control, you can define multiple pages for the same area of a window or dialog box in your application.

Syntax

TabStrip

The properties, methods and events of the TabStrip control are described in the following table.

Properties Methods Events
ClientHeight Move Click
ClientWidth Refresh
ClientLeft SetFocus
ClientTop ZOrder
FontBold
FontItalic
FontStrikethru
FontUnderline
FontName
FontSize
Height (ActiveX)
Width (ActiveX)
ImageList
Left (ActiveX)
Top (ActiveX)
MultiRow
Name
Object
Parent
SelectedItem
Style
TabFixedHeight
TabFixedWidth
Tabs
TabWidthStyle
Visible

Remarks

The control consists of one or more Tab objects in a Tabs collection. At both design-time and run-time you can affect the Tab object's appearance by setting properties. You can also add and remove tabs using the Properties Page of the TabStrip control at design time, or add and remove Tab objects at run time using methods.

The Style property determines whether the TabStrip control looks like push buttons (Buttons) or notebook tabs (Tabs). At design time when you put a TabStrip control on a form, it has one notebook tab.

To set the overall size of the TabStrip control, use its drag handles and/or set the Top, Left, Height, and Width properties. Based on the control's overall size at run time, the toolkit automatically determines the size and position of the internal area and returns the Client-coordinate properties–ClientLeft, ClientTop, ClientHeight, and ClientWidth. The MultiRow property determines whether the control can have more than one row of tabs, the TabWidthStyle property determines the appearance of each row, and, if TabWidthStyle is set to TabFixed, you can use the TabFixedHeight and TabFixedWidth properties to set the same height and width for all tabs in the TabStrip control.

The TabStrip control is not a container. To contain the actual pages and their objects, you must use Frame controls or other containers that match the size of the internal area which is shared by all Tab objects in the control.