Skip to content

textual.scrollbar

Contains the widgets that manage Textual scrollbars.

Note

You will not typically need this for most apps.

ScrollBar

ScrollBar(vertical=True, name=None, *, thickness=1)

Bases: Widget

renderer class-attribute

renderer = ScrollBarRender

The class used for rendering scrollbars. This can be overridden and set to a ScrollBarRender-derived class in order to delegate all scrollbar rendering to that class. E.g.:

class MyScrollBarRender(ScrollBarRender): ...

app = MyApp()
ScrollBar.renderer = MyScrollBarRender
app.run()

Because this variable is accessed through specific instances (rather than through the class ScrollBar itself) it is also possible to set this on specific scrollbar instance to change only that instance:

my_widget.horizontal_scrollbar.renderer = MyScrollBarRender

action_grab

action_grab()

Begin capturing the mouse cursor.

action_scroll_down

action_scroll_down()

Scroll vertical scrollbars down, horizontal scrollbars right.

action_scroll_up

action_scroll_up()

Scroll vertical scrollbars up, horizontal scrollbars left.

ScrollBarCorner

ScrollBarCorner(
    *children,
    name=None,