Replies: 1 comment
-
Hello, Looking over the code history, I know why this exists as it does. Originally the You can see the code I added to the drop down to do what you are trying to do here:
Which is technically correct to spec as it is the I think it might be most useful to add two new bits of info to the event dictionary for the three
That way we should be fully backwards compatible. Does that sound sensible to you? |
Beta Was this translation helpful? Give feedback.
-
I've created a (UIWindow) container:
then I created a UISelectionList:
Next I build a list of tuples with the format (str(text), str(object_id)) and assign this list of tuples to the UISelectionList:
self.test_drop_down_menu.set_item_list(elements)
When I get the event of a selection list item being selected, as such:
the event.ui_object_id is not the id I had assigned in the tuple when calling set_item_list
how do I identify which of the selection items is firing the event? Is this the correct ID I am getting back? I would like to access 'str(object_id)'
After writing all of this out, I suppose my next step would be to get the selection item based on the text returned, which I should then be able to get the original id. But this seems clunky.
Beta Was this translation helpful? Give feedback.
All reactions