How to remove initial wx.RadioBox selection?

后端 未结 4 415
有刺的猬
有刺的猬 2021-01-22 08:13

I have the following code :

myList =[\'a\',\'b\']
rb=wx.RadioBox(self.panel, -1, \"Options :\", (0, 0), wx.DefaultSize,myList, 2, wx.RA_SPECIFY_COLS)
         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-22 09:06

    If your really need to do this then probably the only way is to create your own RadioBox. A RadioBox can easily built from a Panel, StaticBox, StaticBoxSizer and of course RadioButtons.

    In the __init__ for your RadioBox use the RadioButtons SetValue() method to set the initial value of the RadioButtons to False.

    Take a look at RadioButton demo in the wxpython Demos, there should be enough there to get you started in the right direction.

提交回复
热议问题