FlexBox¶
- class tanmatsu.widgets.FlexBox(*args, flex_direction: int = 1, **kwargs)¶
Bases:
Container,Box,ScrollableA widget that contains other widgets. Has similar behaviour to flexbox from CSS.
- Parameters
flex_direction (int) – Must be either
VERTICALorHORIZONTAL. Defaults toVERTICAL.
- VERTICAL = 1¶
Flex from top to bottom. Equivalent to flex-direction: column in CSS.
- HORIZONTAL = 2¶
Flex from left to right. Equivalent to flex-direction: row in CSS.
- property flex_direction: int¶
- Getter
Returns the flex direction.
- Setter
Sets the flex direction. Must equal either
VERTICALorHORIZONTAL.