mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
21 lines
416 B
Python
21 lines
416 B
Python
from textual.app import App, ComposeResult
|
|
from textual.widgets import Input
|
|
|
|
|
|
class BlurApp(App):
|
|
BINDINGS = [("f3", "disable")]
|
|
|
|
def compose(self) -> ComposeResult:
|
|
yield Input()
|
|
|
|
def on_ready(self) -> None:
|
|
self.query_one(Input).focus()
|
|
|
|
def action_disable(self) -> None:
|
|
self.query_one(Input).disabled = True
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app = BlurApp()
|
|
app.run()
|