Cannot store item from wx.Choice

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Cannot store item from wx.Choice

Andy P
Hi all, I'm having a bit of trouble trying to understand how to store an option selected from wx.Choice by a user.

When I run my code I can only seem to see it temporarily in the handler function that I created(below).

def choice_hdlr(self,event):
#Store profile selected by user
self.sec_3_data = (self.sec_3_widgets[1].GetString(self.sec_3_widgets[1].GetSelection()))
print("In choice hdl: "+self.sec_3_data)#DELET LATER

As you can see I have a member variable called "self.sec_3_data" where I want to store the option selected by the user. But when I check somewhere else in the code the value in such variable, its empty. 

Any type of guidance will be great.

Thank you all.

Happy Coding. 

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.