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"
|
CSS_PATH = "checkbox.css"
|
||||||
|
|
||||||
def compose(self) -> ComposeResult:
|
def compose(self) -> ComposeResult:
|
||||||
with Vertical():
|
yield Vertical(
|
||||||
yield Checkbox("Arrakis :sweat:")
|
Checkbox("Arrakis :sweat:"),
|
||||||
yield Checkbox("Caladan")
|
Checkbox("Caladan"),
|
||||||
yield Checkbox("Chusuk")
|
Checkbox("Chusuk"),
|
||||||
yield Checkbox("[b]Giedi Prime[/b]")
|
Checkbox("[b]Giedi Prime[/b]"),
|
||||||
yield Checkbox("[magenta]Ginaz[/]")
|
Checkbox("[magenta]Ginaz[/]"),
|
||||||
yield Checkbox("Grumman", True)
|
Checkbox("Grumman", True),
|
||||||
yield Checkbox("Kaitain", id="initial_focus")
|
Checkbox("Kaitain", id="initial_focus"),
|
||||||
yield Checkbox("Novebruns", True)
|
Checkbox("Novebruns", True),
|
||||||
|
)
|
||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
self.query_one("#initial_focus", Checkbox).focus()
|
self.query_one("#initial_focus", Checkbox).focus()
|
||||||
|
|||||||
Reference in New Issue
Block a user