def createControl(self): return widgets.TreeListCtrl(self.frame, [self.column1, self.column2], None, None, None, None, columnPopupMenu=wx.Menu())
def setUp(self): super(TreeListCtrlTestCase, self).setUp() self._columns = self.createColumns() self.treeCtrl = widgets.TreeListCtrl(self.frame, self.columns(), self.getItemTooltipText, self.onSelect, dummy.DummyUICommand(), dummy.DummyUICommand()) imageList = wx.ImageList(16, 16) for bitmapName in ['led_blue_icon', 'folder_blue_icon']: imageList.Add(wx.ArtProvider_GetBitmap(bitmapName, wx.ART_MENU, (16,16))) self.treeCtrl.AssignImageList(imageList) # pylint: disable=E1101
def setUp(self): super(TreeListCtrlTest, self).setUp() columns = [widgets.Column('subject', 'Subject')] self.treeCtrl = widgets.TreeListCtrl(self.frame, columns, self.onSelect, dummy.DummyUICommand(), dummy.DummyUICommand(), dummy.DummyUICommand()) imageList = wx.ImageList(16, 16) for bitmapName in ['led_blue_icon', 'folder_blue_icon']: imageList.Add( wx.ArtProvider_GetBitmap(bitmapName, wx.ART_MENU, (16, 16))) self.treeCtrl.AssignImageList(imageList) # pylint: disable-msg=E1101
def createWidget(self): imageList = self.createImageList() # Has side-effects self._columns = self._createColumns() itemPopupMenu = menu.NotePopupMenu(self.parent, self.settings, self.taskFile.categories(), self) columnPopupMenu = menu.ColumnPopupMenu(self) self._popupMenus.extend([itemPopupMenu, columnPopupMenu]) widget = widgets.TreeListCtrl(self, self.columns(), self.onSelect, uicommand.Edit(viewer=self), uicommand.NoteDragAndDrop(viewer=self, notes=self.presentation()), itemPopupMenu, columnPopupMenu, **self.widgetCreationKeywordArguments()) widget.AssignImageList(imageList) # pylint: disable=E1101 return widget