Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I hide TabControl tabs at runtime? 1

Status
Not open for further replies.

CADTenchy

Technical User
Dec 12, 2007
237
GB

Is there not a way to hide/unhide individual tabs of a TabControl during runtime?

I've found some reference to it, but they all come up as errors in the BDE?



Steve (Delphi 2007 & XP)
 
doesnt look like it.

you could edit the tabs string list at runtime to add/remove tabs.

Aaron
 

thanks Aaron.

At least I'm being blind or stupid about it then.

Steve (Delphi 2007 & XP)
 
If you use TPageControl then you can change the visibility of individual tabs by using the TabVisible property. For example :
Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
  TabSheet1.TabVisible := not TabSheet1.TabVisible;
end;

Andrew
Hampshire, UK
 

thanks Andrew, I'll check that out as an alternative.


Steve (Delphi 2007 & XP)
 

Hi Andrew,

Finally got round to it.

Yes that is so much better, many thanks.



Steve (Delphi 2007 & XP)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top