Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
OnShow and Modal Dialog |
Mon, Oct 22 2012 7:35 AM | Permanent Link |
Michael Boyle Softrix LImited | In past Delphi applications ive used the OnShow event to show a modal password dialog box on startup, or even a splash screen - I tried this with EWB and it doesnt show the modal dialog at all - if I set the visible property of the password form to true it will show but the modal result from the login button is ignored and doesnt close as intended. Hope that made some sense =) Michael Boyle www.softrix.co.uk |
Mon, Oct 22 2012 8:23 AM | Permanent Link |
Raul Team Elevate | Michael,
Javascript is asynchronous so there is no stop of code execution when you call showmodal. Not sure if that answers you question. Basically you need to handle everything in appropriate events or callbacks. See this thread for example of callback message (you can do a callback with your own forms as well): www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&page=1&msg=857 Raul On 10/22/2012 7:35 AM, Michael Boyle wrote: > In past Delphi applications ive used the OnShow event to show a modal password dialog box on startup, or even a splash screen - I tried this with EWB and it doesnt show the modal dialog at all - if I set the visible property of the password form to true it will show but the modal result from the login button is ignored and doesnt close as intended. > > Hope that made some sense =) > > Michael Boyle > www.softrix.co.uk > |
Mon, Oct 22 2012 2:12 PM | Permanent Link |
Michael Boyle Softrix LImited | |
Wed, Mar 20 2013 9:27 AM | Permanent Link |
Matthew Jones | FWIW, here's a pattern that I think might be useful.
procedure TMyForm.ButtonOptionsClick(Sender: TObject); begin if Sender is TForm then begin if frmMenu.ModalResult = mrOK then begin // stuff end; end else begin frmMenu.OnClose := lnkMenuClick; frmMenu.ShowModal; end; end; The key here is that the event handler for the button which shows a form can also handle the OnClose event for the TForm that the button shows. You could switch the order if you want to make it more logical "ordered", but this keeps the code to do with the form in the same procedure, which made sense to me. /Matthew Jones/ |
Wed, Mar 20 2013 3:08 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< The key here is that the event handler for the button which shows a form can also handle the OnClose event for the TForm that the button shows. You could switch the order if you want to make it more logical "ordered", but this keeps the code to do with the form in the same procedure, which made sense to me. >> Not bad, not bad at all. Thanks, Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, December 12, 2024 at 08:07 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |