【发布时间】:2016-05-24 12:14:30
【问题描述】:
使用frxSimpleTextExport 组件,我可以将我的报告保存为.txt 文件,但只要我点击Save as txt 按钮,就会出现一个不需要的对话框。
我怎样才能让这个窗口不出现,让用户只看到SaveDialog,点击确定后打开?
【问题讨论】:
标签: delphi delphi-10-seattle fastreport
使用frxSimpleTextExport 组件,我可以将我的报告保存为.txt 文件,但只要我点击Save as txt 按钮,就会出现一个不需要的对话框。
我怎样才能让这个窗口不出现,让用户只看到SaveDialog,点击确定后打开?
【问题讨论】:
标签: delphi delphi-10-seattle fastreport
禁用“导出到文本”对话框(您问题中的第一个):
将frxSimpleTextExport.ShowDialog 属性设置为false:
frxSimpleTextExport.ShowDialog := False;
现在这个对话窗口不会出现,但SaveDialog 也会消失。
要在您的表单和frxSimpleTextExport BeginExport 事件中显示“SaveDialog”拖放TSaveDialog:
procedure TForm7.frxSimpleTextExport1BeginExport(Sender: TObject);
begin
if SaveDialog1.Execute() then
begin
frxSimpleTextExport1.FileName := SaveDialog1.FileName;
end;
end;
【讨论】: