VB.NET default radio button selected inside a group box

前端 未结 8 787
醉话见心
醉话见心 2021-01-16 05:46

I have a WinForms application (VS 2008, .NET 3.5) that has a form with two different group boxes, and inside of each group box are different sets of radio buttons. When I r

相关标签:
8条回答
  • 2021-01-16 06:35

    You need to give both radio groups different group names. That may not be your issue, but it's a possible reason.

    I'm curious as to why you would want radios to default to having no value at all. Radios represent boolean values - True or False - there is no other valid state.

    0 讨论(0)
  • 2021-01-16 06:41

    I've had this issue, too. I just manually set all RadioButton objects to .Checked = False in the Form_Shown event. Note that it has to be after the Form_Load event or it won't work, and the RadioButton will be set with a default.

    Why? I don't know. Perhaps a bug in VB.NET.

    0 讨论(0)
提交回复
热议问题