Tuesday, September 11, 2018

How may I make a list of radio buttons not have a default value in WinForms?

This is tricky. You may achieve the effect initially by just setting the TabIndex of all of the radio buttons to be the same thing, but once a button is pressed the first of the radio buttons will get selected. You may make an "invisible" RadioButton that you hide out of sight and use that as the first radio button, but that too has its challenges as a user may tab back to the radio buttons and change back to the bogus setting with the arrow keys. Also you have to compensate for the bogus setting in your code of course.

No comments:

Post a Comment