Reputation: 311
I have main.py and appIndicator.py files. I start appIndicator.py(which use wxPython library) from main.py as subprocess. When I have notificaion, I have to change appIndicator icon. However, I couldn't find any way to do that so when I need to change appIndicator icon, I kill subprocess from main.py, change icon file and start appIndicator as subprocess again but in Windows, when I do that, appIndicator icon is duplicated. Till the I take mouse pointer on old subprocess' icon, it stays there.
Is there any better way to change icon ?
What should I do to be able to clear old icon ?
Do you have any different suggestion ?
Thanks...
Upvotes: 0
Views: 774
Reputation: 33111
In your change icon event handler, try calling the current icon's RemoveIcon()
method and then its Destroy()
method. That should remove it from the taskbar. Then you can create the new icon that should appear there. I believe you'll have to call the new icon's SetIcon()
method to make it appear in the system tray.
Upvotes: 1