wxpython中设置radiobox相关使用
#coding=utf-8 import wx class MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1,"Wxpython Radiobox 演示",size = (800,600)) panel = wx.Panel(self) #第一种方法使用wx.RadioButton类 #RadioButton(parent, id=ID_ANY, label=EmptyString, # pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=RadioButtonNameStr) self.check1 = wx.RadioButton(panel,-1,"Value1",pos = (50,20),style = wx.RB_GROUP) self.check2 = wx.RadioButton(panel, -1, "Value2", pos=(150,20)) self.check3 = wx.RadioButton(panel, -1, "Value3", pos=(250,20)) self.check1.Bind(wx.EVT_RADIOBUTTON,self.Event1)