Task Bar icon

Maybe some of you bump this too.

I had an application which contained a frame and when i closed it the all application shop down as it should

something like this:
app = wx.App()
frame = MyFrame(None, -1)

then i add it taskbar like this :

frame.tskic = MyTaskBarIcon(frame)

, and now when I try to close it now the frame disappear but the task bar i con stay and the program continue to ran

i use this to close it:

def OnTaskBarClose(self, event):
self.frame.Close()

Hi,

Maybe some of you bump this too.

I had an application which contained a frame and when i closed it the all application shop down as it should

something like this:
app = wx.App()
frame = MyFrame(None, -1)

then i add it taskbar like this :

frame.tskic = MyTaskBarIcon(frame)

, and now when I try to close it now the frame disappear but the task bar i con stay and the program continue to ran

i use this to close it:

def OnTaskBarClose(self, event):
        self.frame.Close()

Taskbar icons need to be destroyed explicitly. Thus, you need to call

frame.tskic.Destroy()

before you call your frame's Close() method.

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

thank you!

···

On Wed, Oct 1, 2008 at 10:00 PM, Mike Driscoll mike@pythonlibrary.org wrote:

Hi,

Maybe some of you bump this too.

I had an application which contained a frame and when i closed it the all application shop down as it should

something like this:

app = wx.App()

frame = MyFrame(None, -1)

then i add it taskbar like this :

frame.tskic = MyTaskBarIcon(frame)

, and now when I try to close it now the frame disappear but the task bar i con stay and the program continue to ran

i use this to close it:

def OnTaskBarClose(self, event):

    self.frame.Close()

Taskbar icons need to be destroyed explicitly. Thus, you need to call

frame.tskic.Destroy()

before you call your frame’s Close() method.


Mike Driscoll

Blog: http://blog.pythonlibrary.org

Python Extension Building Network: http://www.pythonlibrary.org


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


http://kaze.co.il
יש קצה חוט לרעיון שלך