What I’m trying to do:
I would like to reset a group of radio buttons to not selected after a selection has been made.
I have a list of answers and next to each answer is a radio button.
If lets say radio button 2 is selected the value is saved.
A new question is asked
The possible answers change according to the question being asked.
At that point the radiobuttons need to be deselected (This is what I’m trying to do)
and the process will be repeated
Radio buttons have a selected
property, which takes a boolean value. Just set them to False
. For example :
my_radio_button.selected = False
If you have several, you can go round in a loop. For example (pseudocode - untested) :
for rb in container.get_components():
if type(rb) is RadioButton:
rb.selected = False
Something like that.
2 Likes
Many Thanks
Appreciate the help