Question Why do I have to click a radiobutton twice?

robertb_NZ

Well-known member
Joined
May 11, 2010
Messages
146
Location
Auckland, New Zealand
Programming Experience
10+
I put a Groupbox containing four RadioButtons. Everything worked perfectly, except that the settings were not retained from one execution to another.

I defined settings in My.Settings, one for each RB, type Boolean, and set the RB's ApplicationBinding/PropertySetting to these. Thus the first RB is bound to JobNameRule1, the second to JobNameRule2, and so on.

Now when I run the program (with the debugger) I have to click the RB twice. For example, suppose the first is checked and click the third. This turns off the first's check, but leaves them all unchecked. Now I must check the third RB again before it shows as checked. But at least the status is remembered properly from one session to the next.

Is there a property that I need to set to get the previous behavior? Or am I taking the wrong approach?

Thank you, Robert.
 
Unfortunately, binding settings to the Checked property of a RadioButton doesn't work. I'm not sure of the exact details but presumably it has to do with the fact that multiple RadioButtons are inextricably linked. You'll have to load and save your settings manually for those controls.
 
Back
Top