Closed undeadindustries closed 6 years ago
If saving an object into a Choice, how would one get that object back?
This wx python way does not seem to work in wx go?
https://stackoverflow.com/questions/4433715/how-can-i-store-objects-other-than-strings-in-a-wxpython-combobox
Choice := wx.NewChoice(panel, wx.ID_ANY) Choice.SetLabel("Choose an option") Choice.Append(obj) Choice.SetString(theChoice, obj.Name) obj := Choice.GetClientObject()
Thanks!
I'm afraid you have to maintain the objects in your own map - i.e. string/ControlID as the key, and your object as the value.
If saving an object into a Choice, how would one get that object back?
This wx python way does not seem to work in wx go?
https://stackoverflow.com/questions/4433715/how-can-i-store-objects-other-than-strings-in-a-wxpython-combobox
Thanks!