Files
textual/docs/styles/scrollbar_size.md
Will McGugan fa4b971bff more docs
2022-08-04 15:27:41 +01:00

858 B

Scrollbar-size

The scrollbar-size rule changes the size of the scrollbars. It takes 2 integers for horizontal and vertical scrollbar size respectively.

The scrollbar dimensions may also be set individually with scrollbar-size-horizontal and scrollbar-size-vertical.

Example

In this example we modify the size of the widgets scrollbar to be much larger than usual.

=== "scrollbar_size.py"

```python
--8<-- "docs/examples/styles/scrollbar_size.py"
```

=== "Output"

```{.textual path="docs/examples/styles/scrollbar_size.py"}
```

CSS

/* Set horizontal scrollbar to 10, and vertical scrollbar to 4 */
Widget {
    scrollbar-size: 10 4;
}

Python

# Set horizontal scrollbar to 10, and vertical scrollbar to 4
widget.styles.horizontal_scrollbar = 10
widget.styles.vertical_scrollbar = 10