Table Of Contents

Previous topic

Border

Next topic

Brush

This Page

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 Programming with BoxSizer.


class_hierarchy Inheritance Diagram

Inheritance diagram for class BoxSizer

Inheritance diagram of BoxSizer


method_summary Methods Summary

__init__ Constructor for a BoxSizer.
AddSpacer Adds non-stretchable space to the main orientation of the sizer only.
CalcMin Implements the calculation of a box sizer’s minimal.
GetOrientation Returns the orientation of the box sizer, either VERTICAL or HORIZONTAL.
RecalcSizes Implements the calculation of a box sizer’s dimensions and then sets the size of its children (calling Window.SetSize if the child is a window).

property_summary Properties Summary

Orientation See 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)

Methods



__init__(self, orient=HORIZONTAL)

Constructor for a BoxSizer.

orient may be either of VERTICAL or HORIZONTAL for creating either a column sizer or a row sizer.

Parameters: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)
Parameters:size (int) –
Return type: SizerItem


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: Size


GetOrientation(self)

Returns the orientation of the box sizer, either VERTICAL or HORIZONTAL.

Return type:int


RecalcSizes(self)

Implements the calculation of a box sizer’s dimensions and then sets the size of its children (calling Window.SetSize if the child is a window).

It is used internally only and must not be called by the user (call Layout if you want to resize). Documented for information.


Properties



Orientation

See GetOrientation