python - Get Selected Button from RadioButton Group with Wxpython -
i have 2 wxpython radio button groups:
self.red = wx.radiobutton(panel, -1, 'red', (10, q2y), style=wx.rb_group) self.orange = wx.radiobutton(panel, -1, 'orange', (50, q2y)) self.yellow = wx.radiobutton(panel, -1, 'yellow', (100, q2y)) self.dot = wx.radiobutton(panel, -1, 'dot', (10, q3y), style=wx.rb_group) self.triangle = wx.radiobutton(panel, -1, 'triangle', (50, q3y)) self.rectange = wx.radiobutton(panel, -1, 'rectangle', (100, q3y))
is there easy way selected radio button each group without looping through of buttons?
bind using wx.evt_radiobutton , use event.geteventobject in event handler selected button. see wxpython demo radiobutton code sample.
Comments
Post a Comment