Replies: 2 comments
-
I think this is coming in the next Textual release - see #2751! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Your right, awesome - should have looked at the PRs first 😆 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I think it'd be super useful to (as the title suggests) be able to add and remove TabPanes during runtime.
The only resource that I could find was this GitHub discussion which provided some code with absolutely no instructions on how to use it and needed some tweaking to get working. Here's a current working implementation of adding tabs.
It complains a lot if you put it in your main program, so what I did was append it to the end of
~/.local/lib/python3.10/site-packages/textual/widgets/_tabbed_content.py
and then dofrom textual.widgets._tabbed_content import DynamicTabbedContent
which I'm sure isn't the intended way to do, but hey - it worked.I had some issues figuring out how to use it with the context managers, but in the end, I came up with
Which worked like a charm. Anyway, would be super cool to see this being officially supported! ❤️
Beta Was this translation helpful? Give feedback.
All reactions