Mega Code Archive

 
Categories / Delphi / Examples
 

Disable or hide the tabs of a tpagecontrol

Every page of a TPageControl is an instance of TTabSheet. It has a property named TabVisible. If you set this in the object inspector to false, you will have the classic notebook view, without tabs: // disable all tabs for i := 0 to PageControl1.Pages.Count-1 do PageControl1.Pages[i].TabVisible := false; // force a specific page PageControl1.ActivePage := PageControl1.Pages[1];