Skip to content
Discussion options

You must be logged in to vote

This is another good example of a question that deserves a minimal runnable example of the problem. For example, sans some other styling, the OptionList likely is height: auto. So this example would show the problem:

from textual.app import App, ComposeResult
from textual.widgets import OptionList

class OLScrollApp(App[None]):

    def compose(self) -> ComposeResult:
        yield OptionList(*[f"This is option number {n}" for n in range(5000)])

if __name__ == "__main__":
    OLScrollApp().run()

but with styling to tell OptionList how tall it should be, scrolling will work as expected:

from textual.app import App, ComposeResult
from textual.widgets import OptionList

class OLScrollApp(App[

Replies: 1 comment

Comment options

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