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).
refresh_line ¶
refresh_lines ¶
scroll_to ¶
scroll_to(
x=None,
y=None,
*,
animate=True,
speed=None,
duration=None,
easing=None,
force=False,
on_complete=None,
level="basic",
immediate=False
)
Scroll to a given (absolute) coordinate, optionally animating.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
float | None
|
X coordinate (column) to scroll to, or |
None
|
y |
float | None
|
Y coordinate (row) to scroll to, or |
None
|
animate |
bool
|
Animate to new scroll position. |
True
|
speed |
float | None
|
Speed of scroll if |
None
|
duration |
float | None
|
Duration of animation, if |
None
|
easing |
EasingFunction | str | None
|
An easing method for the scrolling animation. |
None
|
force |
bool
|
Force scrolling even when prohibited by overflow styling. |
False
|
on_complete |
CallbackType | None
|
A callable to invoke when the animation is finished. |
None
|
level |
AnimationLevel
|
Minimum level required for the animation to take place (inclusive). |
'basic'
|
immediate |
bool
|
If |
False
|