.. include:: headings.inc .. _BoxSizer: ========================================================================================================================================== |phoenix_title| **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 :ref:`Programming with BoxSizer `. .. seealso:: :ref:`Sizer`, :ref:`Sizers Overview ` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **BoxSizer** .. raw:: html

Inheritance diagram of BoxSizer

| |sub_classes| Known Subclasses ============================== :ref:`StaticBoxSizer`, :ref:`StdDialogButtonSizer`, :ref:`WrapSizer` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~BoxSizer.__init__` Constructor for a :ref:`BoxSizer`. :meth:`~BoxSizer.AddSpacer` Adds non-stretchable space to the main orientation of the sizer only. :meth:`~BoxSizer.CalcMin` Implements the calculation of a box sizer's minimal. :meth:`~BoxSizer.GetOrientation` Returns the orientation of the box sizer, either ``VERTICAL`` or ``HORIZONTAL``. :meth:`~BoxSizer.RecalcSizes` Implements the calculation of a box sizer's dimensions and then sets the size of its children (calling :meth:`Window.SetSize` if the child is a window). ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~BoxSizer.Orientation` See :meth:`~BoxSizer.GetOrientation` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: BoxSizer(Sizer) 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. **Possible constructors**:: BoxSizer(orient=HORIZONTAL) .. method:: __init__(self, orient=HORIZONTAL) Constructor for a :ref:`BoxSizer`. `orient` may be either of ``VERTICAL`` or ``HORIZONTAL`` for creating either a column sizer or a row sizer. :param `orient`: :type `orient`: int .. method:: 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) :param `size`: :type `size`: int :rtype: :ref:`SizerItem` .. method:: 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. :rtype: :ref:`Size` .. method:: GetOrientation(self) Returns the orientation of the box sizer, either ``VERTICAL`` or ``HORIZONTAL``. :rtype: `int` .. method:: RecalcSizes(self) Implements the calculation of a box sizer's dimensions and then sets the size of its children (calling :meth:`Window.SetSize` if the child is a window). It is used internally only and must not be called by the user (call :meth:`Layout` if you want to resize). Documented for information. .. attribute:: Orientation See :meth:`~BoxSizer.GetOrientation`