mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
28 lines
484 B
Python
28 lines
484 B
Python
from textual.app import App, ComposeResult
|
|
|
|
from textual.widgets import Static, TextLog
|
|
|
|
|
|
class BubbleApp(App):
|
|
|
|
CSS = """
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
def compose(self) -> ComposeResult:
|
|
Static("Foo", id="static")
|
|
yield TextLog()
|
|
|
|
def on_key(self) -> None:
|
|
log = self.query_one(TextLog)
|
|
self.query_one(TextLog).write(self.tree)
|
|
log.write(repr((log.size, log.virtual_size)))
|
|
|
|
|
|
app = BubbleApp()
|
|
if __name__ == "__main__":
|
|
app.run()
|