Visual Basic: MSTab Control
The SSTab control provides a group of tabs, each of which acts as a container for other controls. Only one tab is active in the control at a time, displaying the controls it contains to the user while hiding the controls in the other tabs.
An SSTab control is like the dividers in a notebook or the labels on a group of file folders. Using an SSTab control, you can define multiple pages for the same area of a window or dialog box in your application. Using the properties of this control, you can:
- Determine the number of tabs.
- Organize the tabs into more than one row.
- Set the text for each tab.
- Display a graphic on each tab.
- Determine the style of tabs used.
- Set the size of each tab.
To use this control, you must first decide how you want to organize the controls you will place into various tabs. Set the Tabs and TabsPerRow properties to create the tabs and organize them into rows. Then select each tab at design time by clicking the tab. For each tab, draw the controls you want displayed when the user selects that tab. Set the Caption, Picture, TabHeight, and TabMaxWidth properties as needed to customize the top part of the tab.
At run time, users can navigate between tabs by either pressing CTRL+TAB or by using accelerator keys defined in the caption of each tab.
You can also customize the entire SSTab control using the Style, ShowFocusRect, TabOrientation, and WordWrap properties.
Distribution Note The SSTab control is found in the TABCTL32.OCX file. To use the SSTab control in your application, you must add the control's .OCX file to the project. When distributing your application, install the appropriate .OCX file in the user's Microsoft Windows System or System32 directory. For more information on how to add an additional control to a project, see the Visual Basic Programmer's Guide.