Skip to content

RadioSet with Horizontal RadioButtons? #5240

Answered by TomJGooding
clvnkhr asked this question in Q&A
Discussion options

You must be logged in to vote

I think RadioSet inherits from VerticalScroll in the latest version? This is maybe a bit hacky, but saves having to create your own widget:

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


class ExampleApp(App):
    CSS = """
    RadioSet {
        layout: horizontal;
        overflow-y: hidden;
        overflow-x: auto;
    }
    """

    def compose(self) -> ComposeResult:
        yield RadioSet("foo", "bar", "baz")


if __name__ == "__main__":
    app = ExampleApp()
    app.run()

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@clvnkhr
Comment options

Answer selected by clvnkhr
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