wxSizer: Define sizer hierarchie before putting controls in or vice versa?
sbabbitt at commspeed.net
Fri Sep 10 15:44:19 CEST 2004
"Piet" <pit.grinja at gmx.de> wrote in message
news:39cbe663.0409050623.5cef2d4d at posting.google.com...
> I have a short question about sizers and how they work when I have a
> frame or panel with a complex sizer hierarchie. When creating a new
> sizer which sits itself in its parent sizer, should I add the new
> sizer to the parent sizer and then populate the new sizer with its
> controls (some of them might be sizers on their own) or should I
> populate the new sizer with all its controls before I add the new
> sizer to its parent sizer? Or doesn´t it make any difference and all
> the sizes and sizers are calculated anyways when the
> wx.Window.SetSizer(wx.Sizer),wx.Window.SetAutoLayout(True) and
> wx.Sizer.Fit(wx.Window) functions are run before before the window is
> finally made visible?
> Thanx in advance
I like to bunch everything together so its easier to see later.
self.linkpanel = wx.Panel(self.notebook,-1)
self.link_thing = LinkListCtrlPanel(self.linkpanel)
txtbox = wx.BoxSizer(wx.HORIZONTAL)
txtbox.Add(self.link_thing, 2, wx.EXPAND)
More information about the Python-list