steve wrote:
I think the parenting is correct. I couldn't find out what is wrong.
Each object has its own parent and sizer.
Take a closer look at this:
class GridObject(wx.Panel):
def __init__(self, parent, row, cols):
wx.Panel.__init__(self, parent)
self.grid = gridlib.Grid(parent, -1)
self.grid.CreateGrid(row, cols)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(self.grid, 1, wx.EXPAND)
self.SetSizer(sizer)
···
> On Saturday, December 21, 2013 1:00:31 AM UTC+2, Robin Dunn wrote:
>
> Also, a good technique is to start with just the inner components
and
> get their layout working correctly independent of the rest, and then
> add
> them to the next outer component and get that working correctly,
etc.
> If you make each of those components separate classes and
responsible
> for their own layout, then the whole thing comes together much
easier
> than trying to do it all at once.
There is a good reason why I keep requoting this block of text.
--
Robin Dunn
Software Craftsman
http://wxPython.org