Ok, so here's the deal...
I have an app with 5 parts to it, in one window. The window is split
evenly in the middle, with 3 parts on the left and 2 parts on the
right.
On the left I have a panel with some text information - and under
that, another panel with text/buttons - and under than, a listcontrol
widget.
On the right I have a panel with some text information, and under that
a listcontrol widget.
I'm fairly new to WxPython and am still getting used to how the layout
works. Everything in my app works, save for some of the panels are
'too big'. All of the panels take up even space - the three on the
left each take up 1/3 of that column, while the two on the right take
up 1/2 of their column each. I don't want them to be even, but wish to
specify how much space they take up (or have them size to the content
within them.
Here's my code. Perhaps you can help me
(I realize some of the numbers in variables are a bit screwy - I moved
things around a bit. Sorry abou that)
#BEGIN
hbox = wx.BoxSizer(wx.HORIZONTAL)
vbox1 = wx.BoxSizer(wx.VERTICAL)
vbox2 = wx.BoxSizer(wx.VERTICAL)
vbox3 = wx.BoxSizer(wx.VERTICAL)
vbox4 = wx.BoxSizer(wx.VERTICAL)
pnl1 = wx.Panel(self, -1, style=wx.SIMPLE_BORDER)
pnl2 = wx.Panel(self, -1, style=wx.SIMPLE_BORDER)
vbox1.Add(pnl2, 1, wx.EXPAND | wx.ALL, 3)
vbox1.Add(pnl1, 1, wx.EXPAND | wx.ALL, 3)
vbox1.Add(self.lcp, 1, wx.EXPAND | wx.ALL, 3)
pnl2.SetSizer(vbox4)
#pnl2.SetSizeWH(50,50)
pnl1.SetSizer(vbox4)
pnl3 = wx.Panel(self, -1, style=wx.SIMPLE_BORDER)
vbox2.Add(pnl3, 1, wx.EXPAND | wx.ALL, 3)
vbox2.Add(self.lc, 1, wx.EXPAND | wx.ALL, 3)
pnl3.SetSizer(vbox3)
hbox.Add(vbox1, 1, wx.EXPAND)
hbox.Add(vbox2, 1, wx.EXPAND)
self.SetSizer(hbox)
#END