From b527fb2add2cab1a10eeec2d0940f805708f3dcc Mon Sep 17 00:00:00 2001 From: Isaak Buslovich Date: Mon, 20 Nov 2023 19:41:26 +0100 Subject: [PATCH] Test --- text.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 text.py diff --git a/text.py b/text.py new file mode 100644 index 0000000..b4dbab8 --- /dev/null +++ b/text.py @@ -0,0 +1,21 @@ +from textual.app import App +from textual.widgets import ScrollView, TabView, Tab + +class SimpleCLITool(App): + async def on_mount(self): + # Create TabView with two tabs + tabs = TabView( + tabs=[ + Tab("First Tab", content=ScrollView(auto_width=True)), + Tab("Second Tab", content=ScrollView(auto_width=True)) + ] + ) + + # Update content for each tab + tabs.tabs[0].content.update("This is the content of the first tab. " * 10) + tabs.tabs[1].content.update("This is the content of the second tab. " * 10) + + # Dock the tabs into the app's view + await self.view.dock(tabs) + +SimpleCLITool.run(log="textual.log")