textual/docs/examples/how-to/center01.py
Will McGugan dbd3644577
center how to (#3031)
* center how to

* words

* words
2023-07-31 09:56:46 +01:00

20 lines
350 B
Python

from textual.app import App, ComposeResult
from textual.widgets import Static
class CenterApp(App):
"""How to center things."""
CSS = """
Screen {
align: center middle;
}
"""
def compose(self) -> ComposeResult:
yield Static("Hello, World!")
if __name__ == "__main__":
app = CenterApp()
app.run()