Skip to content
⌘ NSIS Forum Archive

one section problem

4 posts

Joel#

one section problem

Hi there 🙂

In 3.0b2, I have the following sections with checkboxes:

SectionGroup /e !CMDS
SectionGroup /e MSVC
Section /o "2003" n2003
SectionEnd

Section /o "2005" n2005
SectionEnd

Section /o "2008" n2008
SectionEnd

Section /o "2010" n2010
SectionEnd

SectionGroupEnd

SectionGroup /e !MINGW
Section /o "TDM" tdm
SectionEnd

Section /o "Strawberry Perl" fresa
SectionEnd
SectionGroupEnd
SectionGroupEnd
And the macro stuff:

Function .onInit
InitPluginsDir
!insertmacro MUI_LANGDLL_DISPLAY
StrCpy $1 ${n2010}
StrCpy $2 ${fresa}
FunctionEnd

Function .onSelChange

!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${n2003}
!insertmacro RadioButton ${n2005}
!insertmacro RadioButton ${n2008}
!insertmacro RadioButton ${n2010}
!insertmacro EndRadioButtons

!insertmacro StartRadioButtons $2
!insertmacro RadioButton ${tdm}
!insertmacro RadioButton ${fresa}
!insertmacro EndRadioButtons

FunctionEnd
When I test the installer, correctly I can checked only one in group ${fresa}, but it force me to choose one:

1.- how can I give the option to unselect either the checkboxes?

Also, when I check ${CMDS} 2003, 2005 and 2008 are checked 🧟 and in ${MINGW} is checked ${tdm} and not ${fresa} as expected...any ideas to help this old nsis user 😢 😉
Anders#
Originally Posted by Joel View Post
I know...I didn't find one macro for checkboxes...is there one?
No you have to code your own logic. In NSIS 3 the changed section id is in $0 in .onSelChange.