Scroll view
ScrollView
is a base class for line api widgets.
ScrollView
class
¶
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_lines
method
¶
scroll_to
method
¶
def scroll_to(
self,
x=None,
y=None,
*,
animate=True,
speed=None,
duration=None,
easing=None,
force=False,
on_complete=None
):
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
|