Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 2nd August 2012, 15:09   #1
jai123
Member
 
Join Date: Apr 2011
Posts: 58
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

code:

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

jai123 is offline   Reply With Quote
Old 2nd August 2012, 15:32   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,840
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
MSG is offline   Reply With Quote
Old 3rd August 2012, 18:02   #3
jai123
Member
 
Join Date: Apr 2011
Posts: 58
Great, thanks for the clarification.
jai123 is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump