Recent

Author Topic: [solve] TPageControl - set TabSheet active by name  (Read 241 times)

Nicole

  • Sr. Member
  • ****
  • Posts: 496
[solve] TPageControl - set TabSheet active by name
« on: September 16, 2022, 12:10:19 pm »
I want to set a certain tabsheet active of a pageControl.

This works fine
Code: Pascal  [Select][+][-]
  1. Form1.PageControl_Main.ActivePageIndex:=1;

Can I say - and how -
Code: Text  [Select][+][-]
  1. Form1.PageControl_Main.ActivePageIndex:='Tabsheet22';

?
(I know, that an integer is no string, this was only to explain the idea)
« Last Edit: September 16, 2022, 01:04:12 pm by Nicole »

korba812

  • Sr. Member
  • ****
  • Posts: 307
Re: TPageControl - set TabSheet active by name
« Reply #1 on: September 16, 2022, 12:40:43 pm »
You can use the ActivePage property:
Code: Pascal  [Select][+][-]
  1. Form1.PageControl_Main.ActivePage:=Tabsheet22;
  2.  

Nicole

  • Sr. Member
  • ****
  • Posts: 496
Re: [solve] TPageControl - set TabSheet active by name
« Reply #2 on: September 16, 2022, 01:04:17 pm »
thank you!

 

TinyPortal © 2005-2018