如何设置在 Windows 上切换任务时在 Alt-Tab 对话框中显示的应用程序图标?
如何为 Windows
上的 wxpython
应用程序设置图标,使其在我在应用程序之间切换时显示在 Alt-Tab
对话框中?
菜单栏中的应用程序图标和正在运行的应用程序的一角显示了我的图标,但是当我使用 Alt-Tab 在应用程序之间切换时,我可以看到带有蓝色轮廓图标的默认方块。
我是否需要做一些额外的事情才能使我的图标显示在 Alt-Tab 对话框中,或者我的图标是否必须包含特殊分辨率?
在我的类初始值设定项中,我设置图标:
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)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这对我有用:
fn 中的图标有多种分辨率(我认为是 16、32 和 48)。
看起来您至少想更改
为
另外,尝试从 wx.Icon 调用中删除 16 并确保您的图标具有其他分辨率。
This works for me:
where the icon in fn has several resolutions (16, 32, and 48, I think).
Looks like you at least want to change
to
Also, try removing the 16's from the wx.Icon call and making sure your icon has other resolutions.