A tab control defines multiple pages for the same area of a window or dialog box. Each page consists of a set of information or a group of controls that an application displays when the user selects the corresponding tab. The Windows operating system uses tab controls to display the taskbar buttons, with the exception of the Start button.
The window class name for a tab control is WC_TABCONTROL, which is defined as "SysTabControl" in Commctrl.h.
Supported Properties and Methods
- The DoDefaultAction method clicks the page tab.
- The DefaultAction property is "Switch".
- The KeyboardShortcut property is the tab control's access key, which is an underlined character in the control's window text. This string contains the access key character appended to the string "Alt+".
- The Name property is obtained from the control's window text (or caption), which is displayed within the tab control.
- The Parent property is a window (ROLE_SYSTEM_PAGETABLIST) that surrounds the control and has the same window class name as the control.
- The Role property is ROLE_SYSTEM_PAGETAB.
- The State property is a combination of one or more of the following values:
STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_SELECTABLE | STATE_SYSTEM_SELECTED | STATE_SYSTEM_FOCUSABLE | STATE_SYSTEM_FOCUSED | STATE_SYSTEM_PRESSED
Tab controls incorrectly return S_OK from the accSelect method when called with the SELFLAG_TAKEFOCUS flag. Tab controls cannot take the keyboard focus.