| 1 | from pytermgui import Container, SizePolicy, pretty |
| 2 | |
| 3 | container = Container( |
| 4 | Container("I fill the space"), |
| 5 | Container("I take up 70%", relative_width=0.7), |
| 6 | Container("I take up exactly\n31 characters", static_width=31), |
| 7 | ) |
| 8 | |
| 9 | |
| 10 | &container.static_width = 70 |
| 11 | &termage.fit(container) |
| 12 | for line in container.get_lines(): |
| 13 | print(line) |