Page 1 of 1

Show and Hide IWCGJQDialog runtime

PostPosted: 27 Apr 2015 13:58
by MarcoRu
Hi all, I'm going crazy with a Dialog on my frame.
My dialog is on a region, where RenderInvisibleContent is set to true. The dialog has visible property set to false.
On the same region I have a button to show the dialog, where the code on click event is:
Code: Select all
dialog.Visible := true

this work, because there are few lines of code.
On the dialog I have another button, where in the first line of code i have:
Code: Select all
dialog.Visible := false

After this I have many other lines of code, that require a bit of time to be completed. The problem is that the dialog disappear (hide) only when the code is finished. In this way the dialog remains visible until the conclusion of my code. I need to close dialog immediately, without wait the end of my instruction, and eventually reshow the dialog when I want.
There is a way to do this? To hide/show dialog immediately without wait the end of my code?

Im using 2.3.0.69 version on I.W. 14.0.34

Re: Show and Hide IWCGJQDialog runtime

PostPosted: 27 Apr 2015 14:46
by Jorge Sousa
Hi

There is a way to do this? To hide/show dialog immediately without wait the end of my code?


You've to realize that this is a client server technology.

Your event is a request made from browser to the server, and when it returns to browser, it will execute all the operations you executed in the same event, translated to javascript at once. When you call Dialog.Visible:= False, it doesn't call the browser at that point, only when the event finishes.

You can call only the close of the dialog, and

- in Dialog.JQDialogOptions.OnClose do the rest.
or
- Start an IWTimer to do the rest.