textual/docs/examples/styles/visibility_containers.py
Dave Pearson 414096233b
Make all styles reference examples capable of being run standalone
Also move the declarations of the stylesheets into the app classes.

See #3650
2023-11-08 14:37:01 +00:00

34 lines
828 B
Python

from textual.app import App
from textual.containers import Horizontal, VerticalScroll
from textual.widgets import Placeholder
class VisibilityContainersApp(App):
CSS_PATH = "visibility_containers.tcss"
def compose(self):
yield VerticalScroll(
Horizontal(
Placeholder(),
Placeholder(),
Placeholder(),
id="top",
),
Horizontal(
Placeholder(),
Placeholder(),
Placeholder(),
id="middle",
),
Horizontal(
Placeholder(),
Placeholder(),
Placeholder(),
id="bot",
),
)
if __name__ == "__main__":
app = VisibilityContainersApp()
app.run()