mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Revert example code to composing the old way
We've not documented it yet so, until we do...
This commit is contained in:
@@ -7,15 +7,16 @@ class CheckboxApp(App[None]):
|
||||
CSS_PATH = "checkbox.css"
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
with Vertical():
|
||||
yield Checkbox("Arrakis :sweat:")
|
||||
yield Checkbox("Caladan")
|
||||
yield Checkbox("Chusuk")
|
||||
yield Checkbox("[b]Giedi Prime[/b]")
|
||||
yield Checkbox("[magenta]Ginaz[/]")
|
||||
yield Checkbox("Grumman", True)
|
||||
yield Checkbox("Kaitain", id="initial_focus")
|
||||
yield Checkbox("Novebruns", True)
|
||||
yield Vertical(
|
||||
Checkbox("Arrakis :sweat:"),
|
||||
Checkbox("Caladan"),
|
||||
Checkbox("Chusuk"),
|
||||
Checkbox("[b]Giedi Prime[/b]"),
|
||||
Checkbox("[magenta]Ginaz[/]"),
|
||||
Checkbox("Grumman", True),
|
||||
Checkbox("Kaitain", id="initial_focus"),
|
||||
Checkbox("Novebruns", True),
|
||||
)
|
||||
|
||||
def on_mount(self):
|
||||
self.query_one("#initial_focus", Checkbox).focus()
|
||||
|
||||
Reference in New Issue
Block a user