mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
18 lines
433 B
Python
18 lines
433 B
Python
from textual.app import App, ComposeResult
|
|
from textual.widgets import ListView, ListItem, Label, Footer
|
|
|
|
|
|
class ListViewExample(App):
|
|
def compose(self) -> ComposeResult:
|
|
yield ListView(
|
|
ListItem(Label("One")),
|
|
ListItem(Label("Two")),
|
|
ListItem(Label("Three")),
|
|
)
|
|
yield Footer()
|
|
|
|
|
|
app = ListViewExample(css_path="list_view.css")
|
|
if __name__ == "__main__":
|
|
app.run()
|