Page Control easy question.... Please help me :)

peter_gx3 used Ask the Experts™
I have a pagecontrol with 5 tabsheets. I made a button for next and back using pagecontrol1.SelectNextPage(true);

but now here is the question how do I make it go to a specific page. for example to the secont page or last page???

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Engineer, Advisory
Top Expert 2005

To go to a specific page you can use either one of two properties:

ActivePage can be set to the desired TTabSheet.
ActivePageIndex can be set if you wish to deal with index of TTabSheet


PageControl1: TPageControl;
TabSheet1: TTabSheet; // Index 0
TabSheet2: TTabSheet; // Index 1
TabSheet3: TTabSheet; // Index 2


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial