stlcours Posted February 29, 2012 Posted February 29, 2012 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! Quote
zilav Posted February 29, 2012 Posted February 29, 2012 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 Quote
docjones Posted February 29, 2012 Posted February 29, 2012 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 Quote
Administrators Farshad Mohajeri Posted February 29, 2012 Administrators Posted February 29, 2012 1) show next form in OnClose event of previous form, but This should work well. That said, I'll add callback support for Show and ShowModal in next versions. Quote
AlbertoVesx Posted August 11, 2012 Posted August 11, 2012 This should work well. That said, I'll add callback support for Show and ShowModal in next versions. This options are still considered? Quote
Administrators Farshad Mohajeri Posted August 17, 2012 Administrators Posted August 17, 2012 This options are still considered? yes. issue #1233 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.