Skip to content
Discussion options

You must be logged in to vote

Are you sure that the scrollbar is appearing on your container and not another parent container or the screen?

For example, this seems to work after a quick test:

from textual.app import App, ComposeResult
from textual.containers import VerticalScroll
from textual.widgets import Static


class ExampleApp(App):
    CSS = """
    Static {
        border: tall cornflowerblue;
    }
    """

    def compose(self) -> ComposeResult:
        yield VerticalScroll()

    def on_mount(self) -> None:
        self.set_interval(0.5, self.add_widget)

    def add_widget(self) -> None:
        container = self.query_one(VerticalScroll)
        container.mount(Static("Does the container have a scrollbar …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@MuongKimhong
Comment options

@TomJGooding
Comment options

Answer selected by MuongKimhong
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants