mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
19 lines
365 B
Python
19 lines
365 B
Python
from textual.app import App, ComposeResult
|
|
|
|
from textual.containers import Container
|
|
|
|
|
|
class ScrollApp(App):
|
|
|
|
def compose(self) -> ComposeResult:
|
|
yield Container(
|
|
Container(), Container(),
|
|
id="top")
|
|
|
|
def key_r(self) -> None:
|
|
self.query_one("#top").remove()
|
|
|
|
if __name__ == "__main__":
|
|
app = ScrollApp()
|
|
app.run()
|