RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTabControl Class

TTabControl is a tab set that has the appearance of notebook dividers.

Pascal
TTabControl = class(TCustomTabControl);
C++
class TTabControl : public TCustomTabControl;

ComCtrls

Use TTabControl to add a control with multiple tab settings to a form. Unlike a page control, TTabControl is not made up of several pages that contain different controls. Instead, TTabControl is a single object. When the current tab changes, the tab control must directly update its contents to reflect the change in an OnChange event handler. 

Disabling a TTabControl object disables all tabs because it is one control. To disable individual tabs, use TPageControl and disable the individual TTabSheet controls that represent the pages.

Note: When using one of the page controls, if you want to restrict a user from switching to a tab, you cannot set TTabSheet.Enabled to false to accomplish that restriction. Instead, use the OnChanging event to prevent the user from selecting a tab.
 

 

TPageControl 

Grouping Controls 

Tab Controls

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!