Package wx :: Class BoxSizer
[frames | no frames]

Type BoxSizer

object --+        
         |        
    Object --+    
             |    
         Sizer --+
                 |
                BoxSizer

Known Subclasses:
StaticBoxSizer, StdDialogButtonSizer

The basic idea behind a box sizer is that windows will most often be laid out in rather simple basic geometry, typically in a row or a column or nested hierarchies of either. A wx.BoxSizer will lay out its items in a simple row or column, depending on the orientation parameter passed to the constructor.

It is the unique feature of a box sizer, that it can grow in both directions (height and width) but can distribute its growth in the main direction (horizontal for a row) unevenly among its children. This is determined by the proportion parameter give to items when they are added to the sizer. It is interpreted as a weight factor, i.e. it can be zero, indicating that the window may not be resized at all, or above zero. If several windows have a value above zero, the value is interpreted relative to the sum of all weight factors of the sizer, so when adding two windows with a value of 1, they will both get resized equally and each will receive half of the available space after the fixed size items have been sized. If the items have unequal proportion settings then they will receive a coresondingly unequal allotment of the free space.


See Also: wx.StaticBoxSizer

Method Summary
BoxSizer __init__(self, orient)
Constructor for a wx.BoxSizer.
  __repr__(self)
int GetOrientation(self)
Returns the current orientation of the sizer.
  SetOrientation(self, orient)
Resets the orientation of the sizer.

Method Details

__init__(self, orient=HORIZONTAL)
(Constructor)

Constructor for a wx.BoxSizer. orient may be one of wx.VERTICAL or wx.HORIZONTAL for creating either a column sizer or a row sizer.
Parameters:
orient
           (type=int)
Returns:
BoxSizer
Overrides:
wx.Sizer.__init__

GetOrientation(self)

Returns the current orientation of the sizer.
Returns:
int

SetOrientation(self, orient)

Resets the orientation of the sizer.
Parameters:
orient
           (type=int)

Generated by Epydoc 2.1.20040428.rpd on Tue Apr 26 14:24:59 2005 http://epydoc.sf.net