def GetLC(self): # listcontrol size and position not flipped # flipped position and size below self.lcLeft = lc.TestListCtrl(self.BigPanel, -1, size=(50, 35), pos=(550, 420), style=wx.LC_REPORT | wx.LC_VIRTUAL, numCols=2) self.CntrlFill(self.lcLeft) self.lcTop = lc.TestListCtrl(self.BigPanel, -1, size=(700, 35), pos=(550, 175), style=wx.LC_REPORT | wx.LC_VIRTUAL, numCols=2) self.CntrlFill(self.lcTop) self.lcTop.itemDataMap = dict() self.lcLow = lc.TestListCtrl(self.BigPanel, -1, size=(700, 255), pos=(550, 175), style=wx.LC_REPORT | wx.LC_VIRTUAL, numCols=2) self.CntrlFill(self.lcLow) self.lcLow.itemDataMap = dict()
def GetExec(self,parent,query): self.parent = parent self.bPSize = parent.GetSize() self.total = [] self.parent.textR.Show(False) self.t = lc.TestListCtrl(self.parent.panelR, -1, size = (75,10), style = wx.LC_REPORT|wx.LC_VIRTUAL, pos = (self.bPSize[0] - 533, self.bPSize[1] - 250), numCols = 5) self.t.cols = ['Symbol','Full Name','Association','Type','Species'] self.t.widths = [50,200,75,50,75] self.parent.windowBin.append(self.t) self.t2 = lc.TestListCtrl(self.parent.panelR, -1, style = wx.LC_REPORT|wx.LC_VIRTUAL, pos = (self.bPSize[0]/2. - 100, self.bPSize[1] - 250), size = (self.bPSize[0] - 445,10), numCols = 3) self.t2.cols = ['GO ID','Term','Ontology'] self.t2.widths = [75, 215, 100] self.parent.windowBin.append(self.t2) self.t.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnSelect) self.ListCntrlFill(self.t) self.ListCntrlFill(self.t2) t = GetExec(query) self.links = t[0] self.ld = t[1] self.t.Refill(t[1])
def ListInit(self): self.list = lc.TestListCtrl(self.coverPanel, -1, size=(75, 10), pos=(self.bPSize[0] - 100, self.bPSize[1] - 20), style=wx.LC_REPORT | wx.LC_VIRTUAL, numCols=4) cols = ['ProbeSet ID', 't-value', 'dof', 'p-score'] space = (self.bPSize[0] - 100) / 4. - 15 colWidths = [space + 30, space, space, space] self.list.Fill(cols, colWidths) self.list.Show(False)
def Init(self, parent, bigPanel, colorList): self.hd = os.getcwd() self.colorList = colorList self.bigPanel = bigPanel self.bPSize = self.bigPanel.GetSize() self.list = lc.TestListCtrl(self.bigPanel, -1, size=(0, 0), pos=(self.bPSize[0] - 118, self.bPSize[1] - 40), style=wx.LC_REPORT | wx.LC_VIRTUAL, numCols=7) self.list.SetBackgroundColour(self.colorList['ViewPanelList']['Back']) self.list.SetForegroundColour(self.colorList['ViewPanelList']['Fore']) self.SetButtons() self.ListCntrlFill() self.list.Show(True) self.ButtonShow(False)
def AdjustBoxes(self): self.parent.resBoxes['top'].Clear() self.parent.resBoxes['low'].Clear() for v in self.parent.resBoxes.values(): v.Show(True) self.parent.resBoxes['low'].Show(False) s = self.parent.resBoxes['low'].GetSize() self.parent.resBoxes['list'] = lc.TestListCtrl( self.parent.panelR, -1, size=self.parent.resBoxes['low'].GetPosition(), pos=(s[0] - 100, s[1]), style=wx.LC_REPORT | wx.LC_VIRTUAL, numCols=2) for v in self.parent.resBoxes.values(): v.Show(True) self.parent.resBoxes['low'].Show(False) self.SetButtons()
def GetExec(self, rec, frame, coverPanel, frSize, pdbMat): self.rec = rec self.frame = frame self.coverPanel = coverPanel self.pdbMat = pdbMat self.frSize = frSize self.bPSize = self.coverPanel.GetSize() self.list = lc.TestListCtrl(self.coverPanel, -1, size=(0, 0), pos=(self.bPSize[0], self.bPSize[1]), style=wx.LC_REPORT | wx.LC_VIRTUAL, numCols=7) self.GetColors() self.list.SetBackgroundColour(self.colorList['ViewPanelList']['Back']) self.list.SetForegroundColour(self.colorList['ViewPanelList']['Fore']) #self.OnSelect(wx.EVT_IDLE) self.ListCtrlFill() self.list.Show(True)
def GetExec(self, typeName, cd): # Enable list control self.curDir = cd self.type = typeName sys.path.append(self.hD + r'.\plugins\listviewPlugins') self.lv = __import__(str(typeName)) os.chdir(self.curDir) self.bPSize = self.bigPanel.GetSize() self.lc = lc.TestListCtrl(self.bigPanel, -1, pos=(self.bPSize[0] - 7, self.bPSize[1] - 2), size=(0, 0), style=wx.LC_REPORT | wx.LC_VIRTUAL, numCols=len(self.viewTypes[self.type][0])) self.ListCntrlFill() self.ListRefill() self.lc.Show(True) self.lc.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnSelect) self.lc.Select(0) os.chdir(self.hD)