Tab

The TAB-CONTROL combines a box with a tab for a control that looks like a file folder. The user may click on any tab to bring it forward. Some tabs have key letters, and in those cases the user may also activate a particular tab by typing the key letter (the underscored letter in the tab's text) in conjunction with the Alt key. You may define a tab's key letter by placing an & in front of the intended key letter in the tab's text. This appears as an underscored letter when the tab is displayed. For example,

DISPLAY TAB-CONTROL, TAB-TO-ADD = ("Tab&1", "Tab&2")

creates a control with two tabs. The first tab has a key letter of "1" and the second tab has a key letter of 2.

The program typically places different screen elements in the box depending on the tab selected.

The tab control can be used by any application that displays its screens on a 32-bit Windows system, including applications deployed with thin client technology. Any attempt to create a tab control on other systems fails and the returned handle is NULL.

When a user clicks on a tab, the program is informed of the new selection and the tab's appearance is updated. (The behavioral distinction between tabs and push buttons is that a tab responds immediately when clicked, and a push button responds with the clicked event only when the mouse button is released.)

You may allow the user to activate the tabs with the keyboard by accepting the tab control as you would any other control (but you need not do so if you want to provide only a mouse interface). During the keyboard operation of the tab controls in Windows applications, the following logic is used by the runtime to process the arrow keys:

If the tab is a multiline tab, up and down arrows are processed by Windows instead of the runtime. Processed by Windows in this context means that Windows decides which tab is selected next as the active tab, and the runtime has no control over that decision.

It's important to define the elements of the tab control in a particular order in the Screen Section to ensure that the runtime displays the control properly. The preferred method is to use separate Screen Section groups to define the contents of each tab page. See Programming Tips - Tab for more information.