Archive: Uncheck all options of a group


Uncheck all options of a group
This sample script:


Section "Group 1 - Option 1" g1o1
SectionEnd

Section /o "Group 1 - Option 2" g1o2
SectionEnd

Section /o "Group 1 - Option 3" g1o3
SectionEnd


Section "Group 2 - Option 1" g2o1
SectionEnd

Section /o "Group 2 - Option 2" g2o2
SectionEnd

Section /o "Group 2 - Option 3" g2o3
SectionEnd

Function .onInit

StrCpy $1 ${g1o1}
StrCpy $2 ${g2o1}

FunctionEnd

Function .onSelChange

!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${g1o1}
!insertmacro RadioButton ${g1o2}
!insertmacro RadioButton ${g1o3}
!insertmacro EndRadioButtons

!insertmacro StartRadioButtons $2
!insertmacro RadioButton ${g2o1}
!insertmacro RadioButton ${g2o2}
!insertmacro RadioButton ${g2o3}
!insertmacro EndRadioButtons

FunctionEnd


Problem: I want to install ONLY "Group 2 - Option 2", but cannot uncheck Group 1. How do I have to change the script to make uncheck possible?


Can anyone help?


The radio button macros give the user an option to select exactly one of the sections in the group. The user can't select none of the sections when you use those macros. The easiest solution would be adding another section to the first group which will install nothing and be labeled "Do nothing". Another option would be creating something based on the radio buttons macros that would allow this.


Originally posted by kichik
The radio button macros give the user an option to select exactly one of the sections in the group. The user can't select none of the sections when you use those macros.
Which is sad, but thank you for your support!