Skip to content

Commit 4e3bf85

Browse files
committed
docstrings
1 parent 689cfd8 commit 4e3bf85

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/textual/scroll_view.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ class ScrollView(ScrollableContainer):
1616
"""
1717
A base class for a Widget that handles its own scrolling (i.e. doesn't rely
1818
on the compositor to render children).
19+
20+
!!! note
21+
22+
This is the typically wrong class for making something scrollable. If you want to make something scroll, set it's
23+
`overflow` style to auto or scroll. Or use one of the pre-defined scrolling containers such as [VerticalScroll][textual.containers.VerticalScroll].
1924
"""
2025

2126
ALLOW_MAXIMIZE = True
@@ -34,6 +39,8 @@ def is_scrollable(self) -> bool:
3439

3540
@property
3641
def is_container(self) -> bool:
42+
"""Since a ScrollView should be a line-api widget, it won't have children,
43+
and therefore isn't a container."""
3744
return False
3845

3946
def watch_scroll_x(self, old_value: float, new_value: float) -> None:

0 commit comments

Comments
 (0)