firemonkey打开子窗体

Posted 咏南中间件和开发框架

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了firemonkey打开子窗体相关的知识,希望对你有一定的参考价值。

procedure TForm1.Button1Click(Sender: TObject);
var
ChildForm: TForm2;
begin
ChildForm := TForm2.Create(nil);
ChildForm.ShowModal(
procedure(ModalResult: TModalResult)
begin
if ModalResult = mrOK then
begin
// 要做的动作
end;
end);
end;

 

子窗体如何释放

procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := TCloseAction.caFree;
end;

以上是关于firemonkey打开子窗体的主要内容,如果未能解决你的问题,请参考以下文章