SelectionList empty #5415
Unanswered
AndyDralle
asked this question in
Q&A
Replies: 1 comment
-
The problem is that you're trying to compose a If you want your widget to be a subclass of class MySelectionList(SelectionList):
def __init__(self) -> None:
selections = [("First", 1), ("Second", 2)]
super().__init__(*selections) |
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
-
Hey!
After a look at the tutorial, I'm trying to create a minimal program with a
SelectionList
. This is my current code:This gives me the following output:
As you can see, my options don't appear.
If I run the
SelectionList
example from https://textual.textualize.io/widgets/selection_list/#__tabbed_1_2, things work as intended. But I don't want my entire app to be aSelectionList
like in that example. I just want this to be one of multiple widgets in my tui, like in the tutorial. That's why I'm trying to adapt the tutorial code, instead of just copying theSelectionList
example directly.Can somebody spot what I'm missing here?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions