Page Controls

From RAD Studio
Jump to: navigation, search

Go Up to Grouping Controls


The page control component (TPageControl) is a page set suitable for multipage dialog boxes. A page control displays multiple overlapping pages that are TTabSheet objects. A page is selected in the user interface by clicking a tab on top of the control.

To create a new page in a page control at design time, right-click the control and choose New Page. At run-time, you add new pages by creating the object for the page and setting its PageControl property:

NewTabSheet = TTabSheet.Create(PageControl1);
NewTabSheet.PageControl := PageControl1;
TTabSheet *pTabSheet = new TTabSheet(PageControl1);
pTabSheet->PageControl = PageControl1;

To access the active page, use the ActivePage property. To change the active page, you can set either the ActivePage or the ActivePageIndex property.

See Also

Code Examples