0
我有3個wxpython單選按鈕。運行時,第一個按鈕(值A)已被選中。我如何製作它,所以最初沒有選擇按鈕?Wxpython單選按鈕預選
self.rb1 = wx.RadioButton(panel, -1, 'Value A', (50, 10), style=wx.RB_GROUP)
self.rb2 = wx.RadioButton(panel, -1, 'Value B', (10, 30))
self.rb3 = wx.RadioButton(panel, -1, 'Value C', (10, 50))
self.Bind(wx.EVT_RADIOBUTTON, self.SetVal, id=self.rb1.GetId())
self.Bind(wx.EVT_RADIOBUTTON, self.SetVal, id=self.rb2.GetId())
self.Bind(wx.EVT_RADIOBUTTON, self.SetVal, id=self.rb3.GetId())