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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...