Jump to content

Recommended Posts

Posted

I know there is a solution of Callback for Dialogs. But how to show the forms in sequence?

 

procedure TFrmClientFindPages.BtnClick(Sender: TObject);

begin

Form1.ShowModal;

Form2.ShowModal;

end;

 

 

Thanks for your answer!

Posted

1) show next form in OnClose event of previous form, but

2) safe option is to start runonce unitimer with small delay (100ms) in OnClose of previous form which will show next form. But unitimer must be put on mainform or something that won't get destroyed.

3) Farshad knows better :rolleyes:

Posted

I know there is a solution of Callback for Dialogs. But how to show the forms in sequence?

 

procedure TFrmClientFindPages.BtnClick(Sender: TObject);

begin

Form1.ShowModal;

Form2.ShowModal;

end;

 

 

Thanks for your answer!

 

Same method

 

define a funcion on TfrmClient that will be the callbacks like

 

Procedure TFrmClient.Callback1(ModalResult:Integer);
Begin
If ModalResult=MrOk then Form2.ShowModalCallback(callback2);
else Donothing;
End;

 

and pass it on a new function when call form1.

 

Form1.ShowModalCallback(Callback1);

 

then, when form1 onclose, call to callback.

 

see this

 

http://forums.unigui.com/index.php?/topic/1473-modal-forms-how-to/page__p__5588__hl__showmodal__fromsearch__1#entry5588

  • 5 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...