Another Question

Mike Driscoll kyosohma at gmail.com
Fri May 23 12:25:28 EDT 2008


On May 23, 10:45 am, Gandalf <goldn... at gmail.com> wrote:
> How can i bind function that handle the mouse clicking  window X event
> or clicking alt+F4
>
> thanks

You really need to learn to ask good questions. Unless people dive
into your previous posts, they won't know what Python GUI toolkit you
are using, which version of said toolkit, which Python or which OS.

Here's a good place to read about events in general:

http://wiki.wxpython.org/EventPropagation

If you use Google, you can look for the close event, which gives you
this:

http://www.wxpython.org/docs/api/wx.CloseEvent-class.html

So you'll want to bind your frame to EVT_CLOSE. You can disable the
"X" in your frame's window by using non-standard style parameters.

Mike



More information about the Python-list mailing list