Reputation: 705
I am using wxpython and I would like to get all the elements in the listbox and returned in a list.
(Almost like the Oposite of the "Set" function)
Example:
Listbox has Dog Cat Fun
The function should return ["Dog","Cat","Fun"]
Thanks
Upvotes: 2
Views: 656
Reputation: 373
.GetItems()
This function can get all elements in your Listbox as a list.
Upvotes: 1
Reputation: 2120
I think there's a GetStrings() function.
listBoxList = yourListBox.GetStrings()
Upvotes: 1