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
wx.StaticBoxSizer, wx.StdDialogButtonSizer, wx.WrapSizer
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 |
|
Method which must be overridden in the derived sizer classes. |
|
Sets the orientation of the box sizer, either |
See |
wx.
BoxSizer
(Sizer)¶Possible constructors:
BoxSizer(orient=HORIZONTAL)
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.
__init__
(self, orient=HORIZONTAL)¶Constructor for a wx.BoxSizer.
orient may be either of wx.VERTICAL
or wx.HORIZONTAL
for creating either a column sizer or a row sizer.
orient (int) –
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)
size (int) –
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.
GetOrientation
(self)¶Returns the orientation of the box sizer, either wx.VERTICAL
or wx.HORIZONTAL
.
int
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 to CalcMin
.
minSize (wx.Size) –
New 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.VERTICAL
or wx.HORIZONTAL
.
orient (int) –
Orientation
¶See GetOrientation
and SetOrientation