Another Question
Mike Driscoll
kyosohma at gmail.com
Fri May 23 16:47:21 EDT 2008
On May 23, 1:44 pm, Gandalf <goldn... at gmail.com> wrote:
> you've been very helpful but still i have only one problem. I wont the
> window not to be close after clicking the X button.
> I wont the program to stay on the toolbar
>
> thanks!
Well then, in your event handler, just don't do anything.
def onClose(self, event):
pass
or maybe you want to hide the frame?
def onClose(self, event):
self.frame.Hide()
Just make sure you give the user some other way to close it and in
that handler, you'll need to call self.frame.Destroy().
Alternatively, you can just tell the frame not to create the "X"
button:
self.frame = wx.Frame(None, -1, title="My Frame",
style=wx.SYSTEM_MENU)
However, that makes it pretty annoying to close.
Mike
More information about the Python-list
mailing list