mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
refactor of compositor
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from tkinter import Place
|
||||
from textual.app import App
|
||||
from textual import events
|
||||
from textual.widgets import Placeholder
|
||||
@@ -9,7 +10,22 @@ class BasicApp(App):
|
||||
|
||||
def on_mount(self):
|
||||
"""Build layout here."""
|
||||
self.mount(uber=Placeholder())
|
||||
|
||||
uber2 = Widget()
|
||||
uber2.add_children(
|
||||
Placeholder(id="uber2-child1"),
|
||||
Placeholder(id="uber2-child2"),
|
||||
)
|
||||
|
||||
self.mount(
|
||||
uber=Widget(
|
||||
Placeholder(id="child1"),
|
||||
Placeholder(id="child2"),
|
||||
Placeholder(id="child3"),
|
||||
),
|
||||
uber2=uber2,
|
||||
)
|
||||
# self.panic(self.tree)
|
||||
|
||||
async def on_key(self, event: events.Key) -> None:
|
||||
await self.dispatch_key(event)
|
||||
|
||||
Reference in New Issue
Block a user