About Tab controls

NoteWindows CE platforms On the Pocket PC, you can use a tab page approach to application design as a substitute for MDI windows, which are not supported on Windows CE platforms. Tab controls are not supported on Smartphone devices or emulators.

A Tab control is a container for tab pages that display other controls. One page at a time fills the display area of the Tab control.

Each page has a tab like an index card divider. The user can click the tab to switch among the pages:

Figure 5-1: Tab control

Shown is a tab control with three tab pages. The Data Window tab page is displayed. Tab labels for the other pages, Tree View and List View, are also visible.

The Tab control allows you to present many pieces of information in an organized way. This is particularly useful when building an application for a handheld device with a limited display area.

When sizing the tab control, remember that the height and width properties of the control refer to the size of the control without the tabs. Therefore, if you are sizing a tab control with tabs at the bottom to fill the window, set the height to about 1024 PBUs if your application uses the default window height of 1280 PBUs.

You add, resize, and move Tab controls just as you do any control. The User’s Guide describes how to add controls to a window or custom visual user object.

Tab terms

You need to know these definitions:

Tab control A control that you place in a window or user object that contains tab pages. Part of the area in the Tab control is for the tabs associated with the tab pages. Any space that is left is occupied by the tab pages themselves.

Tab page A user object that contains other controls and is one of several pages within a Tab control. All the tab pages in a Tab control occupy the same area of the control, and only one is visible at a time. The active tab page covers the other tab pages.

You can define tab pages right in the Tab control, or you can define them in the User Object painter and insert them into the Tab control, either in the painter or during execution.

Tab The visual handle for a tab page. The tab displays a label for the tab page. When a tab page is hidden, the user clicks its tab to bring it to the front and make the tab page active.