Sign in Join
Wiki copytemporary

TSaveDialog/zh CN

English · Français · Русский · 中文(中国)

TSaveDialog 是保存文件的对话框. 控件在 Dialogs tab 的 Component Palette.

此控件为不可见控件,拖放到 form 窗体,然后使用方法 .Execute() 调用.

pascal
procedure TForm1.Button1Click(Sender: TObject);
var
  myfPath: string;
begin
  try
    try
      SaveDialog1.Execute;
      myfPath := SaveDialog1.FileName;
      Memo1.Lines.SaveToFile(myfPath);
      Exit;
    except
      ShowMessage('程序异常,请重新保存');
    end;
  finally
    //无论如何都会执行
    ShowMessage('me');
  end;

end;

参考资料


From the Free Pascal wiki, page "TSaveDialog/zh CN", as it stood on 2020-05-01 after a change by TyphonFinger, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Edited on wiki.freepascal.org by 1 person, 2020

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
TyphonFingerCreated page
TyphonFinger

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.