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;
Comments