Re: how can you update the button's label in the wx EVT_BUTTON?
Re: how can you update the button's label in the wx EVT_BUTTON? I did a quick test to see if it works and it worked on my computer.Here is the code I used (might help to solve your problem):import wxapp = wx.App()frame = wx.Frame(None, wx.ID_ANY, "Button Test", size=(640, 480))panel = wx.Panel(frame)b = wx.Button(panel, wx.ID_ANY, "Press this")bquit = wx.Button(panel, wx.ID_ANY, "")def pressed(event): b.SetLabel("Button pressed")def quit(event): exit(0)b.Bind(wx.EVT_BUTTON, pressed)bquit.Bind(wx.EVT_BUTTON, quit)frame.Show()app.MainLoop() URL: http://forum.audiogames.net/viewtopic.php?pid=359181#p359181 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
how can you update the button's label in the wx EVT_BUTTON?
how can you update the button's label in the wx EVT_BUTTON? Hi all.I and my friend are buildinga GUI app with wx.While we were developing it, we faced an issue.Basically what I want to do is changing the button's label name as soon as it's pressedI've tried using the wx.SetLabel() method, but that doesn't work. Also I've tried searching online for solutions but seems all of them tell the same thing.Do you know how could I fix this issue?Also, if you have any GUI library that you think is better than wx feel free to share it here. URL: http://forum.audiogames.net/viewtopic.php?pid=359159#p359159 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector