TabbedContent does not work with subclasses of Widget #6187
Replies: 2 comments
-
|
We found the following entries in the FAQ which you may find helpful:
Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review. This project is developed and maintained by Will McGugan. Consider sponsoring Will's work on this project (and others). This is an automated reply, generated by FAQtory |
Beta Was this translation helpful? Give feedback.
-
|
Hey @ossenthusiast, It's not that tabbed content is not working with custom widget. You can add Helps to keep the import clean as well :D class MyWidget(Static):
def compose(self) -> ComposeResult:
yield Button("Hello, World!")
with TabbedContent("MyWidget"):
yield MyWidget() # MyWidget is not displayed in the MyWidget tab. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Have you checked closed issues? (https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed)
Yes.
Have you checked against the most recent version of Textual? (https://pypi.org/search/?q=textual)
Yes
In short, if you have a class that extends Widget:
Beta Was this translation helpful? Give feedback.
All reactions