Archive: Deselect RadioButton


Deselect RadioButton
Hi,

I am using the RadioButton macro to select only one checkbox at a given time. Yet, if the user clicks again in the checked RadioButton, I would like to uncheck all checkboxes. Is it possible to easily work around the Radio Button to do this? If not, do you have any suggestions on how to implement it?

My current source code looks as follows


Function .onInit
# Initializes the radio buttons.
StrCpy $1 ${SecCNC_Interface} ; CNC Interface is selected by default
FunctionEnd

Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${SecCNC_Interface}
!insertmacro RadioButton ${SecVision_System}
!insertmacro RadioButton ${SecTechno_icut}
!insertmacro RadioButton ${SecTechScan}
!insertmacro RadioButton ${SecTechProbe}
!insertmacro RadioButton ${SecDaVinci}
!insertmacro RadioButton ${SecCPM}
!insertmacro RadioButton ${SecMetal_Lathe}
!insertmacro RadioButton ${SecWood_Lathe}
!insertmacro RadioButton ${SecPhoenix}
!insertmacro EndRadioButtons
FunctionEnd

I'm surprised that sections.nsh doesn't support this. It would seem a pretty basic thing to be able to deselect all.. You'll have to make your own mutually-exclusive-sections code. I recently posted an example of this: http://forums.winamp.com/showthread.php?t=346707


Great, thanks for the clarification.