[wxpython-users] APP_MODAL for wxFrame
Andrea Gavana
andrea.gavana at gmail.com
Thu May 15 02:12:59 PDT 2008
Hi Astan,
On Thu, May 15, 2008 at 10:07 AM, Astan Chee wrote:
> Hi,
> I have a wxPanel with a wxButton on it and if the button is clicked, a
> wxFrame is activated and showed which is independent and a new window from
> the wxPanel.
> What I want to do is to make this wxFrame behave the way a wxProgressDialog
> with a wxPD_APP_MODAL flag. Meaning it stays on top and I cant interact with
> the wxPanel unless the wxFrame is closed. How do I make the behavior of the
> wxFrame behave this way?
You have a couple of choices:
1) Transform your frame in a wx.Dialog and call ShowModal() on the dialog;
2) Call frame.MakeModal(True) to disable the rest of your app and then
frame.MakeModal(False) when you have finished with your frame to
re-enable your app.
You can see the recent thread here too:
http://lists.wxwidgets.org/pipermail/wxpython-users/2008-May/075340.html
HTH.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
More information about the wxpython-users
mailing list