mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Remove intro02.py
It doesn't appear to be referenced anywhere in the docs.
This commit is contained in:
@@ -1,29 +0,0 @@
|
|||||||
from textual.app import App
|
|
||||||
|
|
||||||
|
|
||||||
class ExampleApp(App):
|
|
||||||
|
|
||||||
COLORS = [
|
|
||||||
"white",
|
|
||||||
"maroon",
|
|
||||||
"red",
|
|
||||||
"purple",
|
|
||||||
"fuchsia",
|
|
||||||
"olive",
|
|
||||||
"yellow",
|
|
||||||
"navy",
|
|
||||||
"teal",
|
|
||||||
"aqua",
|
|
||||||
]
|
|
||||||
|
|
||||||
def on_mount(self):
|
|
||||||
self.styles.background = "darkblue"
|
|
||||||
|
|
||||||
def on_key(self, event):
|
|
||||||
if event.key.isdigit():
|
|
||||||
self.styles.background = self.COLORS[int(event.key)]
|
|
||||||
self.bell()
|
|
||||||
|
|
||||||
|
|
||||||
app = ExampleApp()
|
|
||||||
app.run()
|
|
||||||
Reference in New Issue
Block a user