File size: 592 Bytes
2c3c408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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()