Stack Layout

_images/stacklayout.gif

New in version 1.0.5.

StackLayout arranges children vertically or horizontally, as many as the layout can fit.

class kivy.uix.stacklayout.StackLayout(**kwargs)

Bases: kivy.uix.layout.Layout

Stack layout class. See module documentation for more information.

minimum_height

Minimum height needed to contain all childrens.

New in version 1.0.8.

minimum_height is a kivy.properties.NumericProperty, default to 0.

minimum_size

Minimum size needed to contain all childrens.

New in version 1.0.8.

minimum_size is a ReferenceListProperty of (minimum_width, minimum_height) properties.

minimum_width

Minimum width needed to contain all childrens.

New in version 1.0.8.

minimum_width is a kivy.properties.NumericProperty, default to 0.

orientation

Orientation of the layout.

orientation is an OptionProperty, default to ‘lr-tb’. Only supports ‘lr-tb’ and ‘tb-lr’ at the moment.

Note

lr mean Left to Right. tb mean Top to Bottom.

padding

Padding between widget box and children, in pixels.

padding is a NumericProperty, default to 0.

spacing

Spacing between children, in pixels.

spacing is a NumericProperty, default to 0.