[wxPython-users] BoxSizer or GridSizer for laying out a form?

Robin Dunn robin at alldunn.com
Fri Sep 29 11:35:52 PDT 2006


John Salerno wrote:
> If I want a data entry form with labels on the left and text boxes on 
> the right, such as:
> 
> First Name: ___________
> Last Name:  ___________
> 
> etc.
> 
> is it better to use a grid or a box sizer? I just tried a grid sizer but 
> it has the effect of spreading everything out across the whole frame. 
> (I'm using wx.Notebook, so really the sizer is on panel which is on a 
> notebook which is on a panel which is on the main frame, if that matters.)

The wx.FlexGridSizer is well suited for this type of layout.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list