Question
“How can I control the visibility of the Notebook tabs?”
Solution
The following example shows how to use the Designer.Notebook.SetTabsVisible method to hide the Preview tab.
Download: DesignerHideNotebookTab.zip
Sample Delphi code:
1 2 3 4 5 6 7 8 9 10 11 12 |
procedure TForm1.Button1Click(Sender: TObject); var liPreviewTab: Integer; begin liPreviewTab := ppDesigner1.Notebook.PageCount-1; ppDesigner1.Notebook.SetTabVisible(liPreviewTab, False); ppDesigner1.ShowModal; end; |