depth first search

This commit is contained in:
Will McGugan
2022-10-13 16:43:59 +01:00
parent 88447b78f6
commit 5a8e492294
6 changed files with 122 additions and 21 deletions

View File

@@ -0,0 +1,9 @@
Focusable {
padding: 3 6;
background: blue 20%;
}
Focusable :focus {
border: solid red;
}

View File

@@ -0,0 +1,20 @@
from textual.app import App, ComposeResult
from textual.widgets import Static, Footer
class Focusable(Static, can_focus=True):
pass
class ScreensFocusApp(App):
def compose(self) -> ComposeResult:
yield Focusable("App - one")
yield Focusable("App - two")
yield Focusable("App - three")
yield Focusable("App - four")
yield Footer()
app = ScreensFocusApp(css_path="screens_focus.css")
if __name__ == "__main__":
app.run()