I have added a minimal example. When the modal dialog opens everything
is fine. You press Preview and the Table Preview opens. You look, maybe
print the table and close the Preview. Voila, the dialog isn't modal any
more (cick on the titlebar of mainframe, not the Dialog button again).I had a look at your code, and none of my original ideas work.
It seems to me that there is a problem in opening non-modal
windows from modal windows. I'm not sure if that is a feature
or a bug... Robin?
It is possible this is simply a bizarre side effect of the Windows GUI model.
Interesting stuff. You can press the huge "Dialog" button again after
closing the preview, and get an entirely new instance of the modal dialog,
even though the first instance has not yet returned from ShowModal. (I added
print statements to prove this.)
I tried to add an EVT_CLOSE to a sub class of the PrintTable,
but that didn't work at all.
...
File "G:\Python21\wxPython\wx.py", line 919, in EVT_CLOSE
win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func)
AttributeError: MyPrintTable instance has no attribute 'Connect'I've never run into windows that can't handle events before
so I'm really lost here.
And you STILL haven't: PrintTable is not a window. It's just a normal
Python class that happens to CREATE a window.
···
On Fri, 12 Apr 2002 13:14:07 +0200, Magnus <magnus@thinkware.se> wrote:
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.