本文整理匯總了Python中wx.EVT_TASKBAR_LEFT_DCLICK屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.EVT_TASKBAR_LEFT_DCLICK屬性的具體用法?Python wx.EVT_TASKBAR_LEFT_DCLICK怎麽用?Python wx.EVT_TASKBAR_LEFT_DCLICK使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類wx
的用法示例。
在下文中一共展示了wx.EVT_TASKBAR_LEFT_DCLICK屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_TASKBAR_LEFT_DCLICK [as 別名]
def __init__(self, frame):
wxTaskBarIcon.__init__(self)
self.frame = frame
self.SetIcon(GetMondrianIcon())
self.Bind(EVT_TASKBAR_LEFT_DCLICK, self.OnTaskBarLeftDClick)
self.Bind(wx.EVT_MENU, self.OnAbout, id=self.ID_About)
self.Bind(wx.EVT_MENU, self.OnCloseshow, id=self.ID_Closeshow)
示例2: __init__
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_TASKBAR_LEFT_DCLICK [as 別名]
def __init__(self, frame):
wx.TaskBarIcon.__init__(self)
self.frame = frame
self.icon = get_taskbar_icon()
self.timer = wx.Timer(self)
self.timer.Start(REFRESH_RATE_MILLIS)
self.is_paused = False
self.SetIcon(self.icon, "GUIMiner")
self.imgidx = 1
self.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, self.on_taskbar_activate)
self.Bind(wx.EVT_MENU, self.on_taskbar_activate, id=self.TBMENU_RESTORE)
self.Bind(wx.EVT_MENU, self.on_taskbar_close, id=self.TBMENU_CLOSE)
self.Bind(wx.EVT_MENU, self.on_pause, id=self.TBMENU_PAUSE)
self.Bind(wx.EVT_TIMER, self.on_timer)
示例3: CreateMenu
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_TASKBAR_LEFT_DCLICK [as 別名]
def CreateMenu(self):
self.Bind(wx.EVT_TASKBAR_RIGHT_UP, self.ShowMenu)
self.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, self.toggle_window_visibility)
self.Bind(wx.EVT_MENU, self.toggle_window_visibility, id=self.wx_id)
self.Bind(wx.EVT_MENU, self.MainFrame.iconClose, id=wx.ID_EXIT)
if ON_WINDOWS:
self.MainFrame.Bind(wx.EVT_ICONIZE, self.set_window_visible_off)
else:
self.MainFrame.Bind(wx.EVT_ICONIZE, self.iconized)
self.menu=wx.Menu()
self.menu.Append(self.wx_id, "Minimize","...")
self.menu.AppendSeparator()
self.menu.Append(wx.ID_EXIT, "Close Chronolapse")
示例4: __init__
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_TASKBAR_LEFT_DCLICK [as 別名]
def __init__(self, frame):
wx.TaskBarIcon.__init__(self)
self.frame = frame
self._update_task = TaskSingleton()
self.tooltip = None
self.set_tooltip(app_name)
self.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, self.OnTaskBarActivate)
self.Bind(wx.EVT_MENU, self.Toggle, id=self.TBMENU_TOGGLE)
self.Bind(wx.EVT_MENU, wx.the_app.quit, id=self.TBMENU_CLOSE)
示例5: __init__
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_TASKBAR_LEFT_DCLICK [as 別名]
def __init__(self, frame):
wx.TaskBarIcon.__init__(self)
self.frame = frame
# Set the image
icon = self.MakeIcon(WXPdemo.GetImage())
self.SetIcon(icon, "wxPython Demo")
self.imgidx = 1
# bind some events
self.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, self.OnTaskBarActivate)
self.Bind(wx.EVT_MENU, self.OnTaskBarActivate, id=self.TBMENU_RESTORE)
self.Bind(wx.EVT_MENU, self.OnTaskBarClose, id=self.TBMENU_CLOSE)
示例6: __init__
# 需要導入模塊: import wx [as 別名]
# 或者: from wx import EVT_TASKBAR_LEFT_DCLICK [as 別名]
def __init__(self, show):
self.stateIcons = (
wx.Icon(join(eg.imagesDir, "Tray1.png"), wx.BITMAP_TYPE_PNG),
wx.Icon(join(eg.imagesDir, "Tray3.png"), wx.BITMAP_TYPE_PNG),
wx.Icon(join(eg.imagesDir, "Tray2.png"), wx.BITMAP_TYPE_PNG),
)
self.tooltip = eg.APP_NAME + " " + eg.Version.string
wx.TaskBarIcon.__init__(self)
# SetIcon *must* be called immediately after creation, as otherwise
# it won't appear on Vista restricted user accounts. (who knows why?)
if show:
self.Show()
self.currentEvent = None
self.processingEvent = None
self.currentState = 0
self.reentrantLock = threading.Lock()
eg.Bind("ProcessingChange", self.OnProcessingChange)
menu = self.menu = wx.Menu()
text = eg.text.MainFrame.TaskBarMenu
menu.Append(ID_SHOW, text.Show)
menu.Append(ID_HIDE, text.Hide)
menu.AppendSeparator()
menu.Append(ID_EXIT, text.Exit)
self.Bind(wx.EVT_MENU, self.OnCmdShow, id=ID_SHOW)
self.Bind(wx.EVT_MENU, self.OnCmdHide, id=ID_HIDE)
self.Bind(wx.EVT_MENU, self.OnCmdExit, id=ID_EXIT)
self.Bind(wx.EVT_TASKBAR_RIGHT_UP, self.OnTaskBarMenu)
self.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, self.OnCmdShow)