header fixes, and lazy queries

This commit is contained in:
Will McGugan
2022-08-13 09:12:59 +01:00
parent 71bb29d5d4
commit f00e2d22d4
18 changed files with 398 additions and 157 deletions

View File

@@ -1,13 +1,17 @@
from textual.app import App
from textual.widgets import Footer
from textual.widgets import Header, Footer
class FooterApp(App):
def on_mount(self):
self.dark = True
self.sub_title = "Header and footer example"
self.bind("b", "app.bell", description="Play the Bell")
self.bind("d", "dark", description="Toggle dark")
self.bind("f1", "app.bell", description="Hello World")
self.bind("f2", "app.bell", description="Do something")
def action_dark(self):
self.dark = not self.dark
def compose(self):
yield Header()
yield Footer()