def OnPopupMenu(self, event): """ Open Popup menu """ if not hasattr(self, 'pup_menus'): return menu = cdml.setupMenu(self, self.pup_menus, False) # crate popup menu and assign event handler self.PopupMenu(menu) # open popup menu menu.Destroy() # remove from memory to show just once when right button is clicked
def OnPopupMenu(self, event): """ Open Popup menu """ if not hasattr(self, 'pup_menus'): return menu = cdml.setupMenu(self, self.pup_menus, False) # crate popup menu and assign event handler self.PopupMenu(menu) # open popup menu menu.Destroy() # remove from memory to show just once when right button is clicked
def OnPopupMenu(self, event): """ Event handler to open Popup menu """ if not hasattr(self, 'pup_menus'): return menu = cdml.setupMenu(self, self.pup_menus, False) # crate popup menu and assign event handler page = self.nb.GetCurrentPage() menu_enable = cdml.iif( page.Id == 0, False, True ) item_add = menu.FindItemById(cdml.IDF_BUTTON1) item_del = menu.FindItemById(cdml.IDF_BUTTON2) item_add.Enable(menu_enable) item_del.Enable(menu_enable) self.PopupMenu(menu) # open popup menu menu.Destroy() # remove from memory to show just once when right button is clicked
def OnPopupMenu(self, event): """ Event handler to open Popup menu """ if not hasattr(self, 'pup_menus'): return menu = cdml.setupMenu(self, self.pup_menus, False) # crate popup menu and assign event handler page = self.nb.GetCurrentPage() menu_enable = cdml.iif( page.Id == 0, False, True ) item_add = menu.FindItemById(cdml.IDF_BUTTON1) item_del = menu.FindItemById(cdml.IDF_BUTTON2) item_add.Enable(menu_enable) item_del.Enable(menu_enable) self.PopupMenu(menu) # open popup menu menu.Destroy() # remove from memory to show just once when right button is clicked