def createCombo(self, x, y, cblist): w = len(cblist[0])+3 h = 1 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) #style = wx.CB_DROPDOWN | wx.TE_PROCESS_ENTER wdt = combo(self.panel, (x, y), cblist) return wdt
def createCombo(self, text, clist = ['']): box = wx.BoxSizer(wx.HORIZONTAL) label = wx.StaticText(self, -1, text) box.Add(label, 0, wx.ALIGN_CENTRE|wx.ALL, 5) text = combo(self, (0, 0), clist) box.Add(text, 1, wx.ALIGN_CENTRE|wx.ALL, 5) #self.sizer.Add(box, 0, wx.GROW|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5) self.sizer.Add(box, 0, wx.EXPAND|wx.ALL, 0) return text