Tabs

A tab control is similar to a set of notebook dividers: it separates topics or sections of information and helps you locate a particular topic or section easily. In Windows 95, a tab control on a property sheet lets a user move from page to page, viewing information and setting options. An application typically defines a group of dialog boxes as property sheet pages, each of which appears when the user clicks the corresponding tab.

The Windows 95 user interface employs tabs extensively in Control Panel. The Display Properties dialog box, which is shown in Figure 4-1, is a Control Panel property sheet whose tabs let you access pages on which you can view or change options for the background, the screen saver, the screen appearance, and various other display settings.

 

Figure 4-1.

The Display Properties dialog box.

You can also use a tab to carry out a specific command, much as you can choose a menu item to immediately perform an action. Figure 4-2 is a screen shot showing tabs in this button-style format.

Tab controls have styles. Actually, each control can have more than one style. If you create a tab control using the default style TCS_TABS, your tabs will look like notebook dividers, as shown in Figure 4-1, with all of the tabs displayed in a single row of left-justified text (TCS_SINGLELINE). For multiple rows of tabs, you can use the TCS_MULTILINE style. Using the TCS_BUTTONS style creates the buttonlike tabs shown in Figure 4-2.

 

Figure 4-2.

A dialog box with button-style tabs.