jeudi 8 décembre 2016

handler to allow only one checkbox selection at a time

I have about a dozen checkboxes on a form and potentially many more in the future. I'm trying to see if there is a quick way (maybe creating a handler) to only allow one selection at a time. I'm hoping to do something where if user checks in a checkbox, and tries to select another - then the previous one will be unchecked. I have them all in a groupbox.

I'm trying to stay away from something like this...

If checkbox1.checkstate=checkstate.checked then
   checkbox2.checkstate=checkstate.unchecked 
   'and 3, 4, 5,
End if

No radio buttons. Need to use checkboxes.




Aucun commentaire:

Enregistrer un commentaire