Tidy up the docstring of Widget.scroll_to

Delivering on a promise made in #1920.
This commit is contained in:
Dave Pearson
2023-03-01 14:35:38 +00:00
parent 2fce894b90
commit 52b69d50d0

View File

@@ -1511,14 +1511,13 @@ class Widget(DOMNode):
"""Scroll to a given (absolute) coordinate, optionally animating.
Args:
x: X coordinate (column) to scroll to, or None for no change. Defaults to None.
y: Y coordinate (row) to scroll to, or None for no change. Defaults to None.
animate: Animate to new scroll position. Defaults to True.
speed: Speed of scroll if animate is True. Or None to use duration.
duration: Duration of animation, if animate is True and speed is None.
easing: An easing method for the scrolling animation. Defaults to "None",
which will result in Textual choosing the default scrolling easing function.
force: Force scrolling even when prohibited by overflow styling. Defaults to `False`.
x: X coordinate (column) to scroll to, or `None` for no change.
y: Y coordinate (row) to scroll to, or `None` for no change.
animate: Animate to new scroll position.
speed: Speed of scroll if `animate` is `True`; or None to use duration.
duration: Duration of animation, if `animate` is `True` and `speed` is `None`.
easing: An easing method for the scrolling animation.
force: Force scrolling even when prohibited by overflow styling.
Note:
The call to scroll is made after the next refresh.