Page 1 of 1
Change a no modal dialog to modal after activate
Posted: Wed Oct 04, 2006 2:13 pm
by Maurilio Viana
Is possible change a no modal dialog to modal after activate him?
I refer to any like:
(...)
activate dialog oDlg NoWait centered
// do anything
// turn oDlg to modal here!
Regards,
Maurilio
Posted: Wed Oct 04, 2006 2:42 pm
by James Bott
Maurilio,
What you descibe doesn't sound very useful.
Example. You put up a non-modal dialog over a parent window and the user clicks on the toolbar on the parent window, but instead of the button working, the dialog becomes modal. I can imagine a very confused user.
Perhaps I am not understanding what you are trying to do?
James
Posted: Wed Oct 04, 2006 2:48 pm
by Maurilio Viana
James,
What I want do is create a black or gray dialog and turn it transparent (it will causa a shadow over my screen) and after I activate my dialog.
The effect I want is like when whe click Start / Shutdown where the backgroud turn shadowed.
Now I do this sequence:
1. create a non modal dialog (shadow)
2. create a modal dialog
3. when close the modal close shadow too
My problem:
The shadow effect display ok, but if I click in non modal dialog (shadow) it appear over the modal dialog and I can't get back...
Regards
Maurilio
Posted: Wed Oct 04, 2006 3:10 pm
by James Bott
Maurilio,
Hmm. The modal/non-modal state is set via the STYLE clause and I don't think an object can have it's style changed after it is created (but I may be wrong).
Can you just make both dialogs modal? You can call one modal dialog from another, but the user wouldn't be able to click on the first dialog (the shadow). I mean, they could click on it, but the click would be ignored. You can close the first dialog via code after the second one is opened.
I don't know it that helps.
James
Posted: Wed Oct 04, 2006 3:32 pm
by Antonio Linares
Maurilio,
If you disable (oWnd:Disable()) all windows and dialogs under the dialog, it will act as a modal dialog.
Posted: Wed Oct 04, 2006 4:05 pm
by Maurilio Viana
James and Antonio,
I'll do some tests.
Thanks a lot!
Maurilio