+
+ #---------------------------------------------
+ def OnTaskBarActivate(self, evt):
+ if self.IsIconized():
+ self.Iconize(false)
+ if not self.IsShown():
+ self.Show(true)
+ self.Raise()
+
+ #---------------------------------------------
+
+ TBMENU_RESTORE = 1000
+ TBMENU_CLOSE = 1001
+
+ def OnTaskBarMenu(self, evt):
+ menu = wxMenu()
+ menu.Append(self.TBMENU_RESTORE, "Restore wxPython Demo")
+ menu.Append(self.TBMENU_CLOSE, "Close")
+ self.tbicon.PopupMenu(menu)
+ menu.Destroy()
+
+ #---------------------------------------------
+ def OnTaskBarClose(self, evt):
+ self.Close()
+
+ # because of the way wxTaskBarIcon.PopupMenu is implemented we have to
+ # prod the main idle handler a bit to get the window to actually close
+ wxGetApp().ProcessIdle()
+
+
+ #---------------------------------------------
+ def OnIconfiy(self, evt):
+ wxLogMessage("OnIconfiy")
+ evt.Skip()
+
+ #---------------------------------------------
+ def OnMaximize(self, evt):
+ wxLogMessage("OnMaximize")
+ evt.Skip()
+
+
+
+