Topic: Page control tabs

Happy Easter to all.......


Is there any way to rename page control tabs by the end user?

Adam
God... please help me become the person my dog thinks I am.

Re: Page control tabs

Hi Adam,
Happy Easter to you too.
The simplest way (ergo, the best - LOL!) is probably to use a standalone table where the user simply edits the relevant value in an editable tablegrid and can immediately see the effect on the tabsheet captions.
Derek.

Post's attachments

Attachment icon rename tabsheets.zip 437.82 kb, 99 downloads since 2023-04-10 

Re: Page control tabs

Hello Derek, AD1408

I use this snippet ;

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
   Form1.PageControl1.Pages[0].Caption := 'New Name';
end;

The same way for others TabsSheets
JB

Re: Page control tabs

Hi Derek & JB,


Thank you very much guys.........
Truly appreciated......


I guess currently, it's not possible to delete and add new tabsheets beside renaming them by the end user?

Adam
God... please help me become the person my dog thinks I am.

Re: Page control tabs

Hi,
Rather than delete them, you could hide tabsheets by adding a flag to the standalone table to indicate whether a tabsheet should be set to visible := false or not.
You could also show / hide them as part of role-based User Authorisations.
But I'm not sure why you'd want to add new ones - and even if you could, they would just be empty sheets so you'd then need to add fields, grids etc plus any processing logic - a complete non-starter I would have thought.
Derek.

Re: Page control tabs

Thanks for the reply Derek...
Simpler solution is show/hide as you have pointed out.
Adding and deleting tabs will require to add/delete functional RTF or Memo fields at the least which is beyond me.
Once again thank you very much for your kind help and advice.

Adam
God... please help me become the person my dog thinks I am.