How do I setup icon, for wxpython application on Windows, that shows up in the Alt-Tab dialog when I'm switching between applications?
The application icon in the menu bar and the corner of the running app shows my icon but when I switch between applications using Alt-Tab I can see the default square with blue outline icon.
Do I need to do something extra for my icon to show up in Alt-Tab dialog or does my icon have to include a special resolution?
In my class initializer I setup icon :
class A(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,-1,title,size=(265,434))
favicon = wx.Icon('C:\source\python\gui\gf.ico',
wx.BITMAP_TYPE_ICO, 16,16)
wx.Frame.SetIcon(self,favicon)
This works for me:
self.icon = wx.Icon(fn, wx.BITMAP_TYPE_ICO)
self.SetIcon(self.icon)
where the icon in fn has several resolutions (16, 32, and 48, I think).
Looks like you at least want to change
wx.Frame.SetIcon(self,favicon)
to
self.SetIcon(favicon)
Also, try removing the 16's from the wx.Icon call and making sure your icon has other resolutions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With