Files
textual/sandbox/will/dock_layer.py
2022-09-09 20:33:55 +01:00

37 lines
592 B
Python

from textual.app import App, ComposeResult
from textual.widgets import Static
class OrderApp(App):
CSS = """
Screen {
layout: center;
}
Static {
border: heavy white;
}
#one {
background: red;
width:20;
height: 30;
dock:left;
}
#two {
background: blue;
width:30;
height: 20;
dock:left;
}
"""
def compose(self) -> ComposeResult:
yield Static("One", id="one")
yield Static("Two", id="two")
app = OrderApp()
if __name__ == "__main__":
app.run()