Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 24th September 2007, 13:33   #1
mk2007
Junior Member
 
Join Date: Sep 2007
Posts: 8
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?
mk2007 is offline   Reply With Quote
Old 25th September 2007, 12:06   #2
mk2007
Junior Member
 
Join Date: Sep 2007
Posts: 8
Can anyone help?
mk2007 is offline   Reply With Quote
Old 25th September 2007, 19:39   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 25th September 2007, 19:43   #4
mk2007
Junior Member
 
Join Date: Sep 2007
Posts: 8
Quote:
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!
mk2007 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