Box layout: arrange widget in horizontal or vertical

Box layout: arrange widget in horizontal or vertical

class pymt.ui.widgets.layout.boxlayout.MTBoxLayout(**kwargs)

Bases: pymt.ui.widgets.layout.abstractlayout.MTAbstractLayout

Box layout can arrange item in horizontal or vertical orientation.

Parameters :
padding : int, default to 0

Padding between the border and content

spacing : int, default to 1

Spacing between widgets

orientation : str, default is ‘horizontal’

Orientation of widget inside layout, can be horizontal or vertical

‘invert’: bool, default to False

makes the layout do top to bottom on horizontal, or rigth to left on vertical

orientation

Orientation of widget inside layout, can be horizontal or vertical

update_minimum_size()

Calculates the minimum size of the layout. In calculation, there must be a space for child widgets that have fixed size (size_hint == None). There must also be at least enough space for every child layout’s minimum size (cant be too small even if size_hint is set)

Previous topic

Anchor layout: Align child widget to a border or center.

Next topic

Grid layout: arrange widget in a grid

This Page