def __init__(self, parent, winId=wx.ID_ANY, hlExe=False, pos=wx.DefaultPosition, size=wx.DefaultSize, style=FL_NO_HEADER, name=wx.ListCtrlNameStr, defaultValue=None, required=False, outLabel=None): ListCtrl.__init__(self, parent, winId, pos, size, style, name=name, defaultValue=defaultValue, required=required, outLabel=outLabel) TextEditMixin.__init__(self) # Highlights executables in red if 'True' self.HLExe = hlExe ## List of globals.fileitem.FileItem instances self.FileItems = []
def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): wx.ListCtrl.__init__(self, parent, ID, pos, size, style) TextEditMixin.__init__(self)
def __init__(self, parent): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT | wx.SUNKEN_BORDER)#, ID, pos, size, style) TextEditMixin.__init__(self) #ListCtrlAutoWidthMixin.__init__(self) self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.OnBeginLabelEdit) self.columnToIgnore = None
def __init__(self, parent, main_window, ind, pd): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT) TextEditMixin.__init__(self) self.main_window = main_window self.ind = ind self.pd = pd self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.on_begin_label_edit) self.Bind(wx.EVT_LIST_END_LABEL_EDIT, self.on_end_label_edit)
def __init__(self, parent): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT, size=wx.Size(750, -1)) TextEditMixin.__init__(self) self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.OnBeginLabelEdit)
def __init__(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize): wx.ListCtrl.__init__(self, parent, id, pos, size, style=wx.LC_REPORT | wx.SUNKEN_BORDER) TextEditMixin.__init__(self) CheckListCtrlMixin.__init__(self) self.InsertColumn(0, 'URL') self.SetColumnWidth(0, size[1] - 60)
def __init__(self, parent): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT | wx.SUNKEN_BORDER)#, ID, pos, size, style) TextEditMixin.__init__(self) ListCtrlAutoWidthMixin.__init__(self) self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.OnBeginLabelEdit) self.columnToIgnore = None
def __init__(self, parent, id=-1, style=wx.LC_REPORT | wx.ALWAYS_SHOW_SB, size=(700, 400)): wx.ListCtrl.__init__(self, parent, id=-1, style=wx.LC_REPORT | wx.ALWAYS_SHOW_SB ,size=(700, 400)) ListCtrlAutoWidthMixin.__init__(self) TextEditMixin.__init__(self) if parent.key == 'Teacher': ColumnSorterMixin.__init__(self, 4) else: ColumnSorterMixin.__init__(self, 3)
def __init__(self, parent): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT) ListCtrlAutoWidthMixin.__init__(self) # The order here matter because we favor Check over Edit TextEditMixin.__init__(self) CheckListCtrlMixin.__init__(self) self.editColumns = []
def __init__(self, parent, m_id, ColumnsToSkip=[0]): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT | wx.LC_SINGLE_SEL) CheckListCtrlMixin.__init__(self) TextEditMixin.__init__(self) self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.OnEndLabelEdit) self.ColumnsToSkip = ColumnsToSkip
def __init__(self, parent, style=0): wx.ListCtrl.__init__(self, parent, style=style) TextEditMixin.__init__(self) # the edit mode should happen only when the user double clicks # on the row, but the TextEditMixin implementation # binds both the wx.EVT_LEFT_DOWN and wx.EVT_LEFT_DCLICK # for the self.OnLeftDown handler, thus the wx.EVT_LEFT_DOWN # needs to be unbound self.Unbind(wx.EVT_LEFT_DOWN) self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDown)
def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): wx.ListCtrl.__init__(self, parent, ID, pos, size, style | wx.LC_VIRTUAL) ListCtrlAutoWidthMixin.__init__(self) TextEditMixin.__init__(self) self.sequences = [] self.SetItemCount(0) self.Bind(wx.EVT_LIST_END_LABEL_EDIT, self.OnModified, self)
def __init__(self, parent, id=-1, style=wx.LC_REPORT | wx.ALWAYS_SHOW_SB, size=(700, 400)): wx.ListCtrl.__init__(self, parent, id=-1, style=wx.LC_REPORT | wx.ALWAYS_SHOW_SB, size=(700, 400)) ListCtrlAutoWidthMixin.__init__(self) TextEditMixin.__init__(self)
def __init__(self, parent): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT) TextEditMixin.__init__(self) CheckListCtrlMixin.__init__(self) ListCtrlAutoWidthMixin.__init__(self) ListRowHighlighter.__init__(self, color=MEDIUM_GREY, mode=1) self.InsertColumn(0, '', width=24) self.InsertColumn(1, 'MNEM', width=80) self.InsertColumn(2, 'UNIT', width=80) self.InsertColumn(3, 'DATA', width=160) self.InsertColumn(4, 'DESC') self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.on_begin_label_edit)
def __init__(self, parent, winId=wx.ID_ANY, hlExe=False, pos=wx.DefaultPosition, size=wx.DefaultSize, style=FL_NO_HEADER, name=wx.ListCtrlNameStr, defaultValue=None, required=False, outLabel=None): ListCtrl.__init__(self, parent, winId, pos, size, style, name=name, defaultValue=defaultValue, required=required, outLabel=outLabel) TextEditMixin.__init__(self) # Highlights executables in red if 'True' self.HLExe = hlExe ## List of globals.fileitem.FileItem instances # FIXME: items in this list are out-of-order when items deleted from BaseFileList # Check `BaseFileList.Delete` self.FileItems = []
def __init__(self, parent, columns, color_foreground, color_background, data): AutoWidthColumnList.__init__(self, parent, columns, color_foreground=color_foreground, color_background=color_background, data=data) TextEditMixin.__init__(self) self.SetBackgroundColour(Colour(color_background)) self.SetForegroundColour(Colour(color_foreground)) self._set_command_column_width() self.col_locs = self._calculate_col_locs() self._new_item_creation = False
def __init__(self, parent, id=-1, style=wx.LC_REPORT | wx.ALWAYS_SHOW_SB, size=(700, 400)): wx.ListCtrl.__init__(self, parent, id=-1, style=wx.LC_REPORT | wx.ALWAYS_SHOW_SB, size=(700, 400)) ListCtrlAutoWidthMixin.__init__(self) TextEditMixin.__init__(self) if parent.key == 'Teacher': ColumnSorterMixin.__init__(self, 4) else: ColumnSorterMixin.__init__(self, 3)
def __init__ (self, parent, colLabels=['name','length','date', 'flies','gender','genotype','comments', 'host','path']): #wx.Panel.__init__(self, parent, wx.ID_ANY) wx.ListCtrl.__init__(self, parent, -1,style=wx.LC_REPORT|wx.LC_VRULES|wx.LC_HRULES) TextEditMixin.__init__(self) #tableBase = InfoTableBase(data, rowLabels, colLabels) #self.SetTable(tableBase) # http://docs.wxwidgets.org/trunk/classwx_list_event.html #self.__editHandler = editHandler #self.Bind(wx.EVT_LIST_END_LABEL_EDIT, self.OnEndLabelEdit, self) self.__colLabels = colLabels i = 0 for col in self.__colLabels: self.InsertColumn(i, str(col)) i = i+1
def __init__(self, parent, headers, size=(-1, 100), callback=None): super().__init__(parent, size=size, style=LC_REPORT | BORDER_SUNKEN) self._init_row_index() for i, text in enumerate(headers): self.InsertColumn(i, text) self.SetColumnWidth(i, self._default_width) # Intial Column width self._column_width[i] = self._default_width ListCtrlAutoWidthMixin.__init__(self) # clip last column to table size if callback: self._edit_callback = callback TextEditMixin.__init__(self) self.Bind(EVT_LIST_END_LABEL_EDIT, self.OnMixUpdate) ColumnSorterMixin.__init__(self, 3) self.itemDataMap = {} self.Bind(EVT_LIST_COL_CLICK, self.OnColClick, self)
def __init__(self, parent): wx.ListCtrl.__init__(self, parent, style=wx.LC_REPORT|wx.SUNKEN_BORDER) ListCtrlAutoWidthMixin.__init__(self) TextEditMixin.__init__(self) menu = wx.Menu() ID_ADD = wx.NewId() ID_INFO = wx.NewId() ID_REMOVE = wx.NewId() menu.Append(ID_ADD, "Add") menu.Append(ID_INFO, "Info") menu.Append(ID_REMOVE, "Remove") parent.Bind(wx.EVT_MENU, parent.onAdd, id=ID_ADD) parent.Bind(wx.EVT_MENU, parent.onInfo, id=ID_INFO) parent.Bind(wx.EVT_MENU, parent.onRemove, id=ID_REMOVE) self.popupmenu = menu self.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.onBeginEdit) self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.onPopupMenu)
def __init__(self, parent, data, rowLabels=None, colLabels=None, editHandler = None): #wx.ListCtrl.__init__(self, parent, -1,style=wx.LC_REPORT|wx.SUNKEN_BORDER) wx.ListCtrl.__init__(self, parent, -1,style=wx.LC_REPORT|wx.LC_VRULES|wx.LC_HRULES) TextEditMixin.__init__(self) #tableBase = InfoTableBase(data, rowLabels, colLabels) #self.SetTable(tableBase) # http://docs.wxwidgets.org/trunk/classwx_list_event.html self.__editHandler = editHandler self.Bind(wx.EVT_LIST_END_LABEL_EDIT, self.OnEndLabelEdit, self) i = 0 for col in colLabels: self.InsertColumn(i,str(col)) i=i+1 i = 0 for row in rowLabels: self.InsertStringItem(i, str(row)) if data[i] is not None: string = str(data[i]) else: string = "" self.SetStringItem(i, 1, string) i = i+1 #self.GetAllData(); self.__rowLabels = rowLabels ''' if rowLabels is None: self.SetRowLabelSize(1) if colLabels is None: self.SetColLabelSize(1) ''' self.Show(True)
def __init__(self, parent, id=-1, style=wx.LC_REPORT | wx.ALWAYS_SHOW_SB, size=(700, 400)): wx.ListCtrl.__init__(self, parent, id=-1, style=wx.LC_REPORT | wx.ALWAYS_SHOW_SB ,size=(700, 400)) ListCtrlAutoWidthMixin.__init__(self) TextEditMixin.__init__(self)
def __init__(self, parent): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT | wx.SUNKEN_BORDER) CheckListCtrlMixin.__init__(self) ListCtrlAutoWidthMixin.__init__(self) TextEditMixin.__init__(self)
def __init__(self, parent, columns, data): AutoWidthColumnList.__init__(self, parent, columns, data) TextEditMixin.__init__(self) self._set_command_column_width() self.col_locs = self._calculate_col_locs() self._new_item_creation = False
def __init__(self, *args, **kwargs): wx.ListCtrl.__init__(self, *args, **kwargs) TextEditMixin.__init__(self)
def OnCreate(self, e): self.Unbind(wx.EVT_INIT_DIALOG) base.le.ui.bindKeyEvents(False) self.filename = None self.name = '' self.Ok = False self.assetType = "Static Mesh" self.importScene = NodePath(PandaNode("importScene")) self.import2d = NodePath(PandaNode("import2d")) self.import2dScaled = self.import2d.attachNewNode( PandaNode("import2dScaled")) self.objPreview = None self.thumbnailTaken = False self.Bind(wx.EVT_CLOSE, self.Close) base.direct.manipulationControl.disableManipulation() self.Show() #init all the panels from XRC for parenting later on self.mainPanel = xrc.XRCCTRL(self, "mainPanel") self.pandaPanel = xrc.XRCCTRL(self, "pandaPanel") self.animPanel = xrc.XRCCTRL(self, "animPanel") self.libraryPanel = xrc.XRCCTRL(self, "libraryPanel") self.typeSelector = xrc.XRCCTRL(self.libraryPanel, 'choiceAssetType') self.typeSelector.Bind(wx.EVT_CHOICE, self.onSwitchType) self.typeSelector.SetStringSelection(self.assetType) self.btnScreenshot = xrc.XRCCTRL(self.mainPanel, "btnScreenShot") self.btnScreenshot.Bind(wx.EVT_BUTTON, self.onScreenShot) self.btnScreenshot.Disable() self.imgThumbnail = xrc.XRCCTRL(self.libraryPanel, 'imgThumbnail') self.btnPlay = xrc.XRCCTRL(self.libraryPanel, "btnPlay") self.btnStop = xrc.XRCCTRL(self.libraryPanel, "btnStop") self.viewport = Viewport('persp', self.pandaPanel) self.viewport.SetClientSize((500, 500)) ViewportManager.updateAll() base.le.ui.wxStep() self.viewport.initialize() self.handles = ObjectHandles('importUIWidget') self.handles.hide() base.direct.manipulationControl.widgetList.append(self.handles) base.direct.drList.addDisplayRegionContext(self.viewport.cam) #apply a mask to make sure GUI stuff from the main window doesn't show up here self.viewport.cam2d.node().setCameraMask(LE_IMPORT_MASK) self.viewport.camera.reparentTo(self.importScene) self.viewport.camera.setPos(-19, -19, 19) self.viewport.camera.lookAt(0, 0, 0) self.viewport.cam2d.reparentTo(self.import2d) dlight = DirectionalLight('dlight') dlight.setColor(VBase4(0.8, 0.8, 0.8, 1)) dlnp = self.importScene.attachNewNode(dlight) self.importScene.setLight(dlnp) dlnp.setHpr(45, -45, 0) alight = AmbientLight('alight') alight.setColor(VBase4(0.25, 0.25, 0.25, 1)) alnp = self.importScene.attachNewNode(alight) self.importScene.setLight(alnp) fileSelector = xrc.XRCCTRL(self.mainPanel, 'btnLoadAsset') fileSelector.Bind(wx.EVT_BUTTON, self.onFileSelect) if self.assetType != "Library": self.nameInput = xrc.XRCCTRL(self.libraryPanel, 'txtObjName') self.nameInput.Bind(wx.EVT_TEXT, self.onNameInput) self.okButton = xrc.XRCCTRL(self.mainPanel, 'btnSendToLibrary') self.okButton.Bind(wx.EVT_BUTTON, self.onOk) self.okButton.Enable(False) self.animPanel = xrc.XRCCTRL(self.mainPanel, 'animPanel') self.btnImportAnim = xrc.XRCCTRL(self.animPanel, 'btnImportAnim') self.btnImportAnim.Bind(wx.EVT_BUTTON, self.onImportAnim) self.btnImportAnim.Enable(False) self.btnRemoveSelected = xrc.XRCCTRL(self.animPanel, 'btnRemoveSelected') self.btnRemoveSelected.Bind(wx.EVT_BUTTON, self.onRemoveSelected) self.btnRemoveSelected.Enable(False) self.listCtrlAnim = xrc.XRCCTRL(self.animPanel, 'listCtrlAnim') self.listCtrlAnim.__class__ = ListCtrlMultiEdit self.btnPlay.Bind(wx.EVT_BUTTON, self.onPlaySound) self.btnStop.Bind(wx.EVT_BUTTON, self.onStopSound) self.listCtrlAnim.Bind(wx.EVT_LIST_END_LABEL_EDIT, self.onEditAnim) self.listCtrlAnim.Bind(wx.EVT_LIST_ITEM_SELECTED, self.onSelectAnim) self.imgThumbnail.Bind(wx.EVT_BUTTON, self.onScreenShot) TextEditMixin.__init__(self.listCtrlAnim) self.Layout()
def OnCreate(self, e): self.Unbind(wx.EVT_INIT_DIALOG) base.le.ui.bindKeyEvents(False) self.filename = None self.name='' self.Ok = False self.assetType = "Static Mesh" self.importScene = NodePath(PandaNode("importScene")) self.import2d = NodePath(PandaNode("import2d")) self.import2dScaled =self.import2d.attachNewNode(PandaNode("import2dScaled")) self.objPreview = None self.thumbnailTaken = False self.Bind(wx.EVT_CLOSE, self.Close) base.direct.manipulationControl.disableManipulation() self.Show() #init all the panels from XRC for parenting later on self.mainPanel = xrc.XRCCTRL(self, "mainPanel") self.pandaPanel = xrc.XRCCTRL(self, "pandaPanel") self.animPanel = xrc.XRCCTRL(self, "animPanel") self.libraryPanel = xrc.XRCCTRL(self, "libraryPanel") self.typeSelector = xrc.XRCCTRL(self.libraryPanel, 'choiceAssetType') self.typeSelector.Bind(wx.EVT_CHOICE, self.onSwitchType) self.typeSelector.SetStringSelection(self.assetType) self.btnScreenshot = xrc.XRCCTRL(self.mainPanel, "btnScreenShot") self.btnScreenshot.Bind(wx.EVT_BUTTON, self.onScreenShot) self.btnScreenshot.Disable() self.imgThumbnail = xrc.XRCCTRL(self.libraryPanel, 'imgThumbnail') self.btnPlay = xrc.XRCCTRL(self.libraryPanel, "btnPlay") self.btnStop = xrc.XRCCTRL(self.libraryPanel, "btnStop") self.viewport = Viewport('persp', self.pandaPanel) self.viewport.SetClientSize((500,500)) ViewportManager.updateAll() base.le.ui.wxStep() self.viewport.initialize() self.handles = ObjectHandles('importUIWidget') self.handles.hide() base.direct.manipulationControl.widgetList.append(self.handles) base.direct.drList.addDisplayRegionContext(self.viewport.cam) #apply a mask to make sure GUI stuff from the main window doesn't show up here self.viewport.cam2d.node().setCameraMask(LE_IMPORT_MASK) self.viewport.camera.reparentTo(self.importScene) self.viewport.camera.setPos(-19,-19,19) self.viewport.camera.lookAt(0,0,0) self.viewport.cam2d.reparentTo(self.import2d) dlight = DirectionalLight('dlight') dlight.setColor(VBase4(0.8,0.8,0.8,1)) dlnp = self.importScene.attachNewNode(dlight) self.importScene.setLight(dlnp) dlnp.setHpr(45,-45,0) alight = AmbientLight('alight') alight.setColor(VBase4(0.25,0.25,0.25,1)) alnp = self.importScene.attachNewNode(alight) self.importScene.setLight(alnp) fileSelector = xrc.XRCCTRL(self.mainPanel, 'btnLoadAsset') fileSelector.Bind(wx.EVT_BUTTON, self.onFileSelect) if self.assetType != "Library": self.nameInput = xrc.XRCCTRL(self.libraryPanel, 'txtObjName') self.nameInput.Bind(wx.EVT_TEXT, self.onNameInput) self.okButton = xrc.XRCCTRL(self.mainPanel, 'btnSendToLibrary') self.okButton.Bind(wx.EVT_BUTTON, self.onOk) self.okButton.Enable(False) self.animPanel = xrc.XRCCTRL(self.mainPanel, 'animPanel') self.btnImportAnim = xrc.XRCCTRL(self.animPanel, 'btnImportAnim') self.btnImportAnim.Bind(wx.EVT_BUTTON, self.onImportAnim) self.btnImportAnim.Enable(False) self.btnRemoveSelected = xrc.XRCCTRL(self.animPanel, 'btnRemoveSelected') self.btnRemoveSelected.Bind(wx.EVT_BUTTON, self.onRemoveSelected) self.btnRemoveSelected.Enable(False) self.listCtrlAnim = xrc.XRCCTRL(self.animPanel, 'listCtrlAnim') self.listCtrlAnim.__class__ = ListCtrlMultiEdit self.btnPlay.Bind(wx.EVT_BUTTON, self.onPlaySound) self.btnStop.Bind(wx.EVT_BUTTON, self.onStopSound) self.listCtrlAnim.Bind(wx.EVT_LIST_END_LABEL_EDIT, self.onEditAnim) self.listCtrlAnim.Bind(wx.EVT_LIST_ITEM_SELECTED, self.onSelectAnim) self.imgThumbnail.Bind(wx.EVT_BUTTON, self.onScreenShot) TextEditMixin.__init__(self.listCtrlAnim) self.Layout()
def __init__(self, parent): wx.ListCtrl.__init__(self, parent, -1, style=wx.LC_REPORT) TextEditMixin.__init__(self)
def __init__(self, *args, **kwargs): ResizableListCtrl.__init__(self, *args, **kwargs) TextEditMixin.__init__(self) self.old_value = None self.BindUI()