system-modal dialogs?

I tried passing the App to my MDI frame from which I construct the dialog
and then doing

parent.SetTopWindow(dlg)

but it appears not to work on dialogs. I'll keep it in mind for the App,
though.

Incidentally, I'm on WinNT, and the wxSTAY_ON_TOP style for dialogs (doc
says Windows only)
didn't work either. Anyone get different mileage?

Thanks,

Bruce

···

-----Original Message-----
From: John Hopkins [mailto:john@hopkinsit.com]
Sent: Thursday, November 14, 2002 1:53 PM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] system-modal dialogs?

Here's some sample code, based on advice from this list some time back. It
works for me on Win98, Win2K and WinXP.

class MyApp(wxApp):
    def OnInit(self):

        frame = MyFrame(NULL, -1, "Hi There!")
        frame.Show(true)

##This is the important line
        self.SetTopWindow(frame)

        return true

app = MyApp(0)
app.MainLoop()

HTH,

John Hopkins

----- Original Message -----
From: "brucedickey" <brucedickey@micron.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Wednesday, November 13, 2002 9:51 AM
Subject: RE: [wxPython-users] system-modal dialogs?

Agreed. I wasn't thinking. I should have asked whether I can make it

always

on top (in view) even when changing focus to another app?

Bruce

-----Original Message-----
From: Chris Barker [mailto:Chris.Barker@noaa.gov]
Sent: Wednesday, November 13, 2002 10:32 AM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] system-modal dialogs?

brucedickey wrote:
> I made a wxDialog and said ShowModal(). It acts like an app-modal

dialog.

> How can I make it system-modal? I.e., the user cannot change focus to
> another app while the dialog is up?

You can't. At least you can't on *nix, and I sure hope you can't on
modern versions of Windows. System Modal dialog boxes are horrible,
horrible things. How do you know what else the user might be doing with
his/her machine? System modal dialog boxes are the thing I swear at most
oftem with MacOS (and there are quite a few things I swear at with that
system!)

-Chris

--
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org