FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change a no modal dialog to modal after activate
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM
Change a no modal dialog to modal after activate
Posted: Wed Oct 04, 2006 02: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

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Change a no modal dialog to modal after activate
Posted: Wed Oct 04, 2006 02: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM
Change a no modal dialog to modal after activate
Posted: Wed Oct 04, 2006 02: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

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Change a no modal dialog to modal after activate
Posted: Wed Oct 04, 2006 03: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Change a no modal dialog to modal after activate
Posted: Wed Oct 04, 2006 03: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
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM
Change a no modal dialog to modal after activate
Posted: Wed Oct 04, 2006 04:05 PM

James and Antonio,

I'll do some tests.

Thanks a lot!
Maurilio

Continue the discussion