Пример #1
0
 def addTable(self, title, columns):
     pt = wx.Panel(self)
     wgt = table(pt)
     for i in range(len(columns)):
         wgt.InsertColumn(i, columns[i])
     
     sizer = wx.BoxSizer(wx.VERTICAL)
     sizer.Add(wgt, 1, wx.ALL|wx.EXPAND, 5)
     pt.SetSizer(sizer)
     self.AddPage(pt, title)
     return wgt
Пример #2
0
 def createTable(self, x, y, w, h, columns):
     """ 创建表格(Table)
     """
     
     x = self.__GET_POS(x, w)
     y = self.__GET_POS_Y(y, h)
     [x, y, w, h] = self.__GET_POS_SIZE(x, y, w, h)
     self.__GET_MAX(x, y, w, h)
     
     tableList = table(self.panel, pos = [x, y], size = [w, h])
     for i in range(len(columns)):
         tableList.InsertColumn(i, columns[i])
     return tableList