"The C++ part of the .. Has been deleted, wsTaskBarIcon

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top