Change a no modal dialog to modal after activate

Change a no modal dialog to modal after activate

Postby Maurilio Viana » Wed Oct 04, 2006 2:13 pm

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

Postby James Bott » Wed Oct 04, 2006 2:42 pm

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

Postby Maurilio Viana » Wed Oct 04, 2006 2:48 pm

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

Postby James Bott » Wed Oct 04, 2006 3:10 pm

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

Postby Antonio Linares » Wed Oct 04, 2006 3:32 pm

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

Postby Maurilio Viana » Wed Oct 04, 2006 4:05 pm

James and Antonio,

I'll do some tests.

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 80 guests