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: procedure TForm1.Button1Click(Sender: TObject); var liPreviewTab: Integer; begin liPreviewTab := ppDesigner1.Notebook.PageCount-1; ppDesigner1.Notebook.SetTabVisible(liPreviewTab, False); ppDesigner1.ShowModal; end;
Search the Wiki
How To…Hide DADE Menu Items
Question “How do I hide some or all of the menu items for the Data Tab?” Solution Check to see that the user has the data tab active in the TabChanged event and typecast the Designer.Menu.Items property as a Data menu object to access the menu items. Download: HideDataMenuItems.zip Sample Delphi code: procedure TForm1.ppDesigner1TabChanged(Sender: TObject); Full Article…
How To…Default Settings for Reports
Question “How can I implement default report settings for new reports created by end-users? And for existing reports?” Solution The following example uses the Report.Template OnNew and OnLoadEnd events to implement default report properties. Download: DesignerInitializeReportProperties.zip Sample Delphi code: procedure TForm1.Button1Click(Sender: TObject); begin // initialize report properties InitializeReport(ppReport1); // assign template event-handlers ppReport1.Template.OnNew := ehTemplate_New; Full Article…