wxPython question: window closing event
Mike Christie
mike.christie at athensgroup.com
Mon Jun 24 13:45:59 EDT 2002
I have a specific and a general question about wxPython. I have worked with
GUIs and event-handlers before, but am new to both wxPython and Python itself.
The specific question is: how do I attach code to the window closing event
that occurs when (in MS Windows systems) you click the X in the top right
corner of the screen? It appears I need to place a "self.close(true)" there,
since exiting via an exit menu (which does call "self.close(true)") shuts
things down politely, but exiting via the X leaves the Python interpreter
still executing my script, and forces me to close Python to shut it down.
The general question is: what's the best resource for finding this sort of
thing out? I've been working through the tutorial material at
http://wiki.wxpython.org/index.cgi/Getting_20Started which has been very
helpful indeed. I've also made some use of the online documentation at
http://wxpython.org/onlinedocs.php which is also great. However, for a
question like this, it seems like the right resource is something like a
categorization of events, or a reference guide for event-handling, or
something like that. The online docs do have an "Event Handling Overview",
but I couldn't find this information there. Is there a book or online
reference that I could use as a resource for this kind of question?
Thanks in advance for any help.
Mike
More information about the Python-list
mailing list