A
andrea_gavana
Hello Alex,
first of all, I would suggest you to upgrade wxPython to 2.5.5.1. There
is no particular reason to stick with 2.4, whatever someone else is thinkink/saying.
Secondly, I strongly suggest you to abandon the syntax:
from wxPython.wx import *
And to use:
import wx
This will help you in future versions of wxPython.
At last, looking at your 3 functions:
def OnExit(self, event):
del self.tbIcon
sys.exit()
def OnCloseWindow(self, event):
del self.tbIcon
sys.exit()
def OnTaskBarClose(self, event):
del self.tbIcon
sys.exit()
It is not enough to call "del self.tbicon". You need to add:
self.tbicon.RemoveIcon()
self.tbicon.Destroy()
del self.tbicon
And you *don't* need the call to sys.exit(). Just call self.Destroy() and
everything will terminate.
HTH.
Andrea.
first of all, I would suggest you to upgrade wxPython to 2.5.5.1. There
is no particular reason to stick with 2.4, whatever someone else is thinkink/saying.
Secondly, I strongly suggest you to abandon the syntax:
from wxPython.wx import *
And to use:
import wx
This will help you in future versions of wxPython.
At last, looking at your 3 functions:
def OnExit(self, event):
del self.tbIcon
sys.exit()
def OnCloseWindow(self, event):
del self.tbIcon
sys.exit()
def OnTaskBarClose(self, event):
del self.tbIcon
sys.exit()
It is not enough to call "del self.tbicon". You need to add:
self.tbicon.RemoveIcon()
self.tbicon.Destroy()
del self.tbicon
And you *don't* need the call to sys.exit(). Just call self.Destroy() and
everything will terminate.
HTH.
Andrea.