I have 6 checkboxes in a Groupbox, the Checkboxes are named myCheckbox(0) to myCheckbox(5)
I would like to be able to choose only one checkbox, if one is selected already then selecting another one deselects the already selected one and selects the just selected one.
I have this code
Dim i as integer = me.Index
For i = 0 to 5
if i = me.index then
Section1CB(i).State = Checkbox.CheckedStates.Checked
Section1Score = i
else
Section1CB(i).State = Checkbox.CheckedStates.Unchecked
end if
next
but when it is the action event all the checkboxes are selected when one is selected.
when it is the mouse down event more than one can be selected.
The same code works well on Mac in the action event.
[RADIO BUTTON]
I wonder how many people here remember WHY they are called that?
Think… before Sirius Radio, before DVD, before CD, before even most FM radio!
The AM radio in your car had pushbuttons for your favorite stations … and when you pushed one, any other that had been pushed in, popped out, so you could never have more than one selected at a time