VCL.MultiPag Sample
From RAD Studio Code Examples
Language:
This sample demonstrates how to use a TPageControl component in a simple multitab application.
Contents |
Location
You can find the multipag sample project at:
- Start > Programs > Embarcadero RAD Studio > Samples and then navigate to CPP\VCL\MultiPag
- Subversion Repository for C++: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE4/CPP/VCL/MultiPag/
Description
The application creates a simple form with four tab sheets. Each tab sheet contains different types of controls like: labels, memos, radio groups, check boxes.
How to Use the Sample
- Navigate to Start > Programs > Embarcadero RAD Studio > Samples and open multipag.cbproj.
- Press F9 or choose Run > Run.
Files
The project has one source file, main, which contains the class for the main form.
Classes
TFormMain is the class for the main form. It contains the handler for the TPageControl.OnChange event.
Implementation
The StatusBar text is changed at run time, indicating the index of the tab that is currently selected. The tab index is retrieved using the TPageControl.ActivePage and TTabSheet.PageIndex properties.