예제 #1
0
 def OnCellRightClick(self, event):
     if hasattr(event, 'Row') and hasattr(event, 'Col'):
         if not (event.Row, event.Col) in self.selection.cells():
             self.select(event.Row, event.Col)
             self.selection.set_from_single_selection(event)
     self._popup_creator.show(self, PopupMenuItems(self, self._popup_items),
                              self.get_selected_content())
예제 #2
0
 def OnRightClick(self, event):
     self._index = event.GetIndex()
     menu_items = ["Select all", "Clear", "---", "Rename", "Delete", "---",
                   "Show tests with this tag",
                   "Show tests without this tag"]
     self.tree._popup_creator.show(self, PopupMenuItems(self, menu_items),
                                   self._controller)
예제 #3
0
 def _row_label_right_click(self, event):
     selected_row = event.GetRow()
     selected_rows = self.selection.rows()
     if selected_row not in selected_rows:
         self.SelectRow(selected_row, addToSelected=False)
         self.SetGridCursor(event.Row, 0)
     popupitems = ['Insert Rows\tCtrl-I', 'Delete Rows\tCtrl-D',
                   'Comment Rows\tCtrl-3', 'Uncomment Rows\tCtrl-4',
                   'Move Rows Up\tAlt-Up', 'Move Rows Down\tAlt-Down']
     PopupMenu(self, PopupMenuItems(self, popupitems))
     event.Skip()
예제 #4
0
 def show_popup(self):
     self._popup_creator.show(self, PopupMenuItems(self, self._actions),
                              self.controller)
예제 #5
0
 def OnRightClick(self, event):
     PopupMenu(self, PopupMenuItems(self, self._menu))
 def OnRightClick(self, event):
     PopupMenu(self, PopupMenuItems(self, self._create_item_menu()))