textual.scroll_view
ScrollView
is a base class for line api widgets.
ScrollView
¶
Bases: ScrollableContainer
A base class for a Widget that handles its own scrolling (i.e. doesn't rely on the compositor to render children).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Widget
|
Child widgets. |
()
|
|
str | None
|
The name of the widget. |
None
|
|
str | None
|
The ID of the widget in the DOM. |
None
|
|
str | None
|
The CSS classes for the widget. |
None
|
|
bool
|
Whether the widget is disabled or not. |
False
|
refresh_lines
¶
refresh_lines(y_start, line_count=1)
scroll_to
¶
scroll_to(
x=None,
y=None,
*,
animate=True,
speed=None,
duration=None,
easing=None,
force=False,
on_complete=None,
level="basic"
)
Scroll to a given (absolute) coordinate, optionally animating.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
float | None
|
X coordinate (column) to scroll to, or |
None
|
|
float | None
|
Y coordinate (row) to scroll to, or |
None
|
|
bool
|
Animate to new scroll position. |
True
|
|
float | None
|
Speed of scroll if |
None
|
|
float | None
|
Duration of animation, if |
None
|
|
EasingFunction | str | None
|
An easing method for the scrolling animation. |
None
|
|
bool
|
Force scrolling even when prohibited by overflow styling. |
False
|
|
CallbackType | None
|
A callable to invoke when the animation is finished. |
None
|
|
AnimationLevel
|
Minimum level required for the animation to take place (inclusive). |
'basic'
|