Hi,
I'm a beginner at wxPython, and I have come up with a problem.
#!/usr/bin/env python
import wx
items = ['Water', 'Food', 'Medicine']
prices = ['50', '150', '600']
class App(wx.Frame):
def __init__(self,parent, id):
wx.Frame.__init__(self, parent, id, "Trader")
self.sizer = wx.GridBagSizer(0, 0)
self.sizer.SetRows(1)
self.sizer.SetCols(2)
self.sizer.AddGrowableRow(0,1)
self.sizer.AddGrowableCol(0,1)
self.sizer.AddGrowableCol(1,1)
self.itemlist = wx.ListBox(self, -1)
self.itemlist.Set(items)
self.pricelist = wx.ListBox(self, -1)
self.pricelist.Set(prices)
self.sizer.Add(self.itemlist,wx.GBPosition(1,1))
self.sizer.Add(self.pricelist,wx.GBPosition(1,2))
self.SetSizer(self.sizer)
self.SetAutoLayout(True)
self.sizer.Fit(self)
self.Show(True)
app = wx.PySimpleApp()
main = App(None, -1)
app.MainLoop()
In this code, you can see that when you resize the window, the lists stay the
same size, and it doesn't look very nice. Is there a way so that everythong can
be 'liquid' and resize with the window?