Containers
Container widgets for quick styling.
With the exception of Center
and Middle
containers will fill all of the space in the parent widget.
HorizontalScroll
class
¶
Bases: ScrollableContainer
A container with horizontal layout and an automatic scrollbar on the Y axis.
ScrollableContainer
class
¶
Bases: Widget
A scrollable container with vertical layout, and auto scrollbars on both axis.
BINDINGS
class-attribute
¶
BINDINGS: list[BindingType] = [
Binding("up", "scroll_up", "Scroll Up", show=False),
Binding(
"down", "scroll_down", "Scroll Down", show=False
),
Binding("left", "scroll_left", "Scroll Up", show=False),
Binding(
"right", "scroll_right", "Scroll Right", show=False
),
Binding(
"home", "scroll_home", "Scroll Home", show=False
),
Binding("end", "scroll_end", "Scroll End", show=False),
Binding("pageup", "page_up", "Page Up", show=False),
Binding(
"pagedown", "page_down", "Page Down", show=False
),
]
Keyboard bindings for scrollable containers.
Key(s) | Description |
---|---|
up | Scroll up, if vertical scrolling is available. |
down | Scroll down, if vertical scrolling is available. |
left | Scroll left, if horizontal scrolling is available. |
right | Scroll right, if horizontal scrolling is available. |
home | Scroll to the home position, if scrolling is available. |
end | Scroll to the end position, if scrolling is available. |
pageup | Scroll up one page, if vertical scrolling is available. |
pagedown | Scroll down one page, if vertical scrolling is available. |
VerticalScroll
class
¶
Bases: ScrollableContainer
A container with vertical layout and an automatic scrollbar on the Y axis.