wxpython最小化图标的创建
2016-05-09 17:00
381 查看
self.cpu["taskBarIcon"] = TaskBarIcon(self, self.cpu) class TaskBarIcon(wx.TaskBarIcon): def __init__(self, frame, cpu): wx.TaskBarIcon.__init__(self) self.cpu = cpu self.frame = frame self.HasEvent = 0 self.Blink = 0 self.PageJump = 3 self.menuBtn = self.cpu["Frame"].menuBtn self.menuBtnType = self.cpu["Handler"].menuBtnType self.SetIcon(wx.Icon(name='img/icon/csmart_32_32_100.ico', type=wx.BITMAP_TYPE_ICO), u'桌面版客户端!') #self.Bind(wx.EVT_TASKBAR_CLICK, self.OnTaskBarClick) self.Bind(wx.EVT_TASKBAR_LEFT_DOWN, self.OnTaskBarClick) def OnTaskBarClick(self, event): self.HasEvent = 0 self.SetIcon(wx.Icon(name='img/icon/csmart_32_32_100.ico', type=wx.BITMAP_TYPE_ICO), u'桌面版客户端!') if self.frame.IsIconized(): self.frame.Iconize(False) if not self.frame.IsShown(): self.frame.Show(True) self.frame.Raise() if not self.menuBtn[self.menuBtnType[self.PageJump][0]].GetStatus(): self.menuBtn[self.menuBtnType[self.PageJump][0]].SetToggle(1) for index in range(0,len(self.menuBtnType)): if (self.menuBtnType[index][0] != self.menuBtnType[self.PageJump][0]): self.menuBtn[self.menuBtnType[index][0]].SetToggle(0) if self.menuBtn[self.menuBtnType[index][0]].GetStatus() else {} self.cpu["Frame"].CreatePage(self.menuBtnType[self.PageJump][0])
相关文章推荐
- python查询IP对应的地理位置
- Python 数据分析包:pandas 基础
- Python sort( ) sorted( ) reverse( ) reversed( ) 总结
- Python pip distribute
- python reverse()方法
- wxPython-多个按钮使用同一个回调函数
- python 装饰器 中的 *args 和 **kwargs
- 爬取分页的标题
- Python学习路程day14
- python 以十六进制输出字符串
- python sort()方法
- python内置模块string源码浅析之maketrans
- python爬虫问题:error: command 'gcc' failed with exit status 1
- Mac OS X下搭建Python3.5.1+PyQt5.6开发环境
- vagrant系列教程(五):vagrant搭建python开发环境
- Python自然语言处理
- Python编程入门
- Python 并发
- python 内置函数 reversed()
- python压缩解压