ithon/examples/mini.it
2024-11-26 15:37:08 -05:00

25 lines
653 B
Text

from textual.app import App, ComposeResult
from textual.widgets import Header, Footer, TextArea
class Mini(App):
"""A Textual app to manage stopwatches."""
BINDINGS = [("ctrl+o", "open", "Open"), ("ctrl+s", "save", "Save"), ("ctrl+alt+s", "save_as", "Save as")]
def compose(self) -> ComposeResult:
"""Create child widgets for the app."""
+> Header()
+> TextArea()
+> Footer()
def action_save(self) -> None:
"""An action to save."""
pass
def action_open(self) -> None: pass
def action_save_as(self) -> None: pass
if __name__ == "__main__":
app = Mini()
app.run()