Change a no modal dialog to modal after activate

Post Reply
User avatar
Maurilio Viana
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil
Contact:

Change a no modal dialog to modal after activate

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
User avatar
Maurilio Viana
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil
Contact:

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Maurilio,

If you disable (oWnd:Disable()) all windows and dialogs under the dialog, it will act as a modal dialog.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Maurilio Viana
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil
Contact:

Post by Maurilio Viana »

James and Antonio,

I'll do some tests.

Thanks a lot!
Maurilio
Post Reply