Page Control Tutorial
- 2 minutes to read
This topic will guide you through the process of creating a simple application illustrating the basic capabilities of the TcxPageControl control.
Place a TcxPageControl onto a form first.
Right-click the control and click the New Page item of the context menu. A new page with its tab will be created.
Add one more tab using the same technique.
Place a TImageList component onto the form and add two images to it.
Assign the modified TImageList component to the Images property of the TcxPageControl control. Images will be displayed within tabs in their order within the image list collection. Note that you must click a tab to activate it. Otherwise the last added page’s properties are displayed within the Object Inspector window.
Switch the control to the first page by clicking the corresponding tab. Click the page. Page properties will be displayed in the Object Inspector window. Set the Caption property of the page to ‘First Page‘.
Place a TLabel control onto the page. Set its caption to ‘The First Page Contents‘.
Select the second page by clicking the corresponding tab. Click the page in order to make its properties available. Set the page’s Caption property to ‘Second Page‘. This is performed in the same way as for the first page.
Place a TEdit control onto the page. Set its text to ‘The Second Page Index‘.
Run the application. Click tabs to see the contents of pages.