Archive: Code for selection


Code for selection
OK, I have learned a lot and searched a lot...

I have three programs. You can only select one at a time. I have figured this out with onesection.nsi

I want to organize these for ease. I want two sections with one section having 2 subsections. I want the user to only chose 1 out of 3.

Choice A=Program 1
Choice B1=program 2
Choice B2=program 3

Any help is appreciated...

Thanks
Brett

My code so far...
---------------------------------
Function .onInit

StrCpy $1 ${Sec1}
StrCpy $2 ${Sec2}

FunctionEnd

Function .onSelChange

!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${Sec1}
!insertmacro RadioButton ${Sec2}
!insertmacro RadioButton ${Sec3}
!insertmacro RadioButton ${Sec4}
!insertmacro EndRadioButtons

FunctionEnd
---------------------------------------------


Section A sec1
SectionEnd

SectionGroup B

Section B1 sec2
SectionEnd

Section B2 sec3
SectionEnd

SectionGroupEnd


Function .onSelChange

!insertmacro StartRadioButtons ${sec1}
!insertmacro RadioButton ${sec1}
!insertmacro RadioButton ${sec2}
!insertmacro RadioButton ${sec3}
!insertmacro EndRadioButtons

FunctionEnd

try this one.