wx.BoxSizer¶
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 several hierarchies of either.
For more information, please see wx.BoxSizer.
See also
 Class Hierarchy¶
 Known Subclasses¶
wx.StaticBoxSizer, wx.StdDialogButtonSizer, wx.WrapSizer
 Methods Summary¶
Constructor for a wx.BoxSizer.  | 
|
Adds non-stretchable space to the main orientation of the sizer only.  | 
|
Implements the calculation of a box sizer’s minimal.  | 
|
Returns the orientation of the box sizer, either   | 
|
Inform sizer about the first direction that has been decided (by parent item).  | 
|
Method which must be overridden in the derived sizer classes.  | 
|
Sets the orientation of the box sizer, either   | 
 Properties Summary¶
See   | 
 Class API¶
- class wx.BoxSizer(Sizer)¶
 Possible constructors:
BoxSizer(orient=HORIZONTAL) -> None
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 several hierarchies of either.
Methods¶
- __init__(self, orient=HORIZONTAL)¶
 Constructor for a wx.BoxSizer.
orient may be either of
wx.VERTICALorwx.HORIZONTALfor creating either a column sizer or a row sizer.- Parameters:
 orient (int)
- Return type:
 None
- AddSpacer(self, size)¶
 Adds non-stretchable space to the main orientation of the sizer only.
More readable way of calling:
if boxSizer.IsVertical(): boxSizer.Add(0, size, 0) else: boxSizer.Add(size, 0, 0)
- Parameters:
 size (int)
- Return type:
 
- CalcMin(self)¶
 Implements the calculation of a box sizer’s minimal.
It is used internally only and must not be called by the user. Documented for information.
- Return type:
 
- GetOrientation(self)¶
 Returns the orientation of the box sizer, either
wx.VERTICALorwx.HORIZONTAL.- Return type:
 int
- InformFirstDirection(self, direction, size, availableOtherDir)¶
 Inform sizer about the first direction that has been decided (by parent item).
Returns
Trueif it made use of the information (and recalculated min size).- Parameters:
 direction (int)
size (int)
availableOtherDir (int)
- Return type:
 bool
- RepositionChildren(self, minSize)¶
 Method which must be overridden in the derived sizer classes.
The implementation should reposition the children using the current total size available to the sizer (
m_size) and the size computed by the last call toCalcMin.- Parameters:
 minSize (wx.Size)
- Return type:
 None
Added in version 4.1/wxWidgets-3.1.3: , before this version RecalcSizes() method not taking any arguments had to be overridden in the derived classes instead.
- SetOrientation(self, orient)¶
 Sets the orientation of the box sizer, either
wx.VERTICALorwx.HORIZONTAL.- Parameters:
 orient (int)
- Return type:
 None
Properties¶
- Orientation¶
 See
GetOrientationandSetOrientation