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

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

Anchors its child widgtes to a certain section of the parent, like left, top, center, rigth...

class pymt.ui.widgets.layout.anchorlayout.MTAnchorLayout(**kwargs)

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

MTAnchorLayout layout: anchorts the Child Widgets to a certain place in the parent widget.
AnchorLayout does not resize children (it ignores size_hint), us a box layout, or other layout inside anchor layout instead)
Parameters :
padding : int, default to 0

Padding between the border and children (ignored if anchor is center!)

anchor_x : str, default to ‘center’

Horizontal Anchor. One of: ‘left’, ‘right, or bottom’, ‘center’. default is center “

anchor_y : str, default to ‘center’

Vertical Anchor. One of: ‘top’, ‘bottom’, or ‘center’. default is center “

anchor_x

Horizontal Anchor. One of: ‘left’, ‘right’, or’center’. default is center

anchor_y

Vertical Anchor. One of: ‘top’, ‘bottom’, or’center’. default is center

Previous topic

Abstract layout: layout base for implementation

Next topic

Box layout: arrange widget in horizontal or vertical

This Page