|
Hobbyist Programmer
Join Date: Dec 2007
Location: England
Posts: 169
Rep Power: 1 
|
wxPython listboxsize
well thanks to sane ive started looking at GUI already using wxPython, however i am having a small issue. I am using the code below to try to produce a 200x380 list bow however, when i run my code i get a very small list box in the top left corner which is correct positioning but completley the wrong size. After looking over my code i cannot see where i am making the mistake. So i would be greatful if you could shed some light on the situation
class mainWin(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(220, 490), style=wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX) panel = wx.Panel(self, -1) hbox = wx.BoxSizer(wx.HORIZONTAL) self.listbox = wx.ListBox(panel, -1,size=(200,380)) hbox.Add(self.listbox, 1,wx.EXPAND | wx.ALL, 5) new = wx.Button(self, 1, 'Message User', (10, 435)) end = wx.Button(self, 2, 'Exit', (120, 435)) hbox.Add(new) hbox.Add(end) panel.SetSizer(hbox) self.Centre() self.Show(True)
Thanks
|