Disable buttons on preview scrren

edited 11:23AM in FastReport 3.0
Can anyone help me how to disable buttons(save, edit) on preview screen? I do see some posts on this but I need actual code in Delphi.

Thanks

Comments

  • gpigpi
    edited 11:23AM
    uses frxClass, frxPreview, ComCtrls, ToolWin, Buttons;
    ...
    
    procedure TForm1.ButtonClick(Sender: TObject);
    begin
         ShowMessage('My Button pressed');
    end;
    
    procedure TForm1.frxReport1Preview(Sender: TObject);
    var
      Button: TSpeedButton;
    begin
      Button := TSpeedButton.Create(TfrxPreviewForm(frxReport1.PreviewForm).ToolBar);
      Button.Parent:=TfrxPreviewForm(frxReport1.PreviewForm).ToolBar;
      Button.Caption:='My Button';
      Button.Width:=60;
      Button.Left:=650;
      Button.OnClick:=ButtonClick;
      TfrxPreviewForm(frxReport1.PreviewForm).PrintB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).OpenB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).SaveB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).PrintB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).ExportB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).EmailB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).FindB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).Sep1.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).ZoomPlusB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).ZoomCB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).Sep3.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).ZoomMinusB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).FullScreenBtn.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).Sep2.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).OutlineB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).ThumbB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).PageSettingsB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).DesignerB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).Sep5.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).FirstB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).PriorB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).PageE.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).Sep4.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).NextB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).LastB.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).frTBPanel1.Visible:=False;
      TfrxPreviewForm(frxReport1.PreviewForm).CancelB.Visible:=False;
    end;
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.