RadioSet with Horizontal RadioButtons? #5240
-
I copied the source of RadioSet, replaced ScrollableContainer with Horizontal and it seems to work: [edit sorry VerticalScroll] |
Beta Was this translation helpful? Give feedback.
Answered by
TomJGooding
Nov 15, 2024
Replies: 1 comment 1 reply
-
I think 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() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
clvnkhr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think
RadioSet
inherits fromVerticalScroll
in the latest version? This is maybe a bit hacky, but saves having to create your own widget: