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

Type BoxSizer

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

Known Subclasses:
BoxSizer, 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.
int GetOrientation(self)
Returns the current orientation of the sizer.
  SetOrientation(self, orient)
Resets the orientation of the sizer.

Property Summary
  Orientation: See GetOrientation and SetOrientation
  thisown: The membership flag

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)


Property Details

Orientation

See GetOrientation and SetOrientation

Get Method:
GetOrientation(self)
Set Method:
SetOrientation(self, orient)

thisown

The membership flag


Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:14:17 2007 http://epydoc.sf.net