On May 23, 1:44 pm, Gandalf <[EMAIL PROTECTED]> 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
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to