Add Custom button in Preview toolbar?

Can I add a custom button in the default Preview toolbar? If so, can you provide an example? Thanks.

Comments

  • gpigpi
    edited 9:04AM
    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;
    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.