Programming C++Builder How to Use Tab Controls and Page Controls and Header Controls in C Builder or Delphi?
Notice: Undefined variable: relatedArticlesCount in /home/wwwroot/ on line 149

How to use Tab Controls and Page Controls and Header Controls in C Builder or Delphi?

The tab controls and page controls are both the useful controls we often use in the standard windows applications' development. Master these controls will give you a high level of user interface design.

How to use Tab controls?

The tab control component (TTabControl) creates a set of tabs that look like notebook dividers. You can create tabs by editing the Tabs property in the Object Inspector; each string in Tabs represents a tab. The tab control is a single panel with one set of components on it. To change the appearance of the control when the tabs are clicked, you need to write an OnChange event handler. To create a multipage dialog box, use a page control instead.

How to use Page 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 runtime, you add new pages by creating the object for the page and setting its PageControl property:

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.

How to use Header controls?

A header control (THeaderControl) is a is a set of column headers that the user can select or resize at runtime. Edit the control's Sections property to add or modify headers. You can place the header sections above columns or fields. For example, header sections might be placed over a list box (TListBox).

Add comment

Security code

Programming - C++Builder