Files
textual/tests/snapshot_tests/snapshot_apps/tabs_invalidate.py
Will McGugan 11cf1f1d28 Fix map invalidation (#2129)
* Invalidation logic

* comment and docstring

* changelog

* snapshot
2023-03-23 18:36:46 +00:00

25 lines
563 B
Python

from textual.app import App, ComposeResult
from textual.widgets import Label, TabbedContent, TabPane
class TabApp(App):
CSS = """
TabPane {
border: solid blue;
}
"""
def compose(self) -> ComposeResult:
with TabbedContent():
with TabPane("Tab 1", id="tab-1"):
yield Label("hello")
yield Label("hello")
yield Label("hello")
with TabPane("Tab 2", id="tab-2"):
yield Label("world")
if __name__ == "__main__":
app = TabApp()
app.run()