Sp33dy G0nz4l3s
14th October 2006 11:02 UTC
When one Section is acitivated an other is required
Hello, I have a problem. I've make an installer. In this installer is a SectionGroup.
The user chan choose there some plugins. Now I have the question is it possible that when the user choose one Section in the SectionGroup an other Section in the SectionGroup is required and must be activated?
I hope you understand what I mean.
Thank you for your help.
Marc
CancerFace
15th October 2006 14:25 UTC
Here is an example using 3 sub-sections in a section group: if subsection 1 is selected then subsection 3 will also be selected (required). Adapted from onesection.nsi
!include "Sections.nsh"
!include "LogicLib.nsh"
Page components
SectionGroup /e "Group A" GA
Section /o "Group 1 - Option 1" g1o1
SectionEnd
Section /o "Group 1 - Option 2" g1o2
SectionEnd
Section /o "Group 1 - Option 3" g1o3
SectionEnd
SectionGroupEnd
Function .onSelChange
SectionGetFlags ${g1o1} $1
SectionGetFlags ${g1o3} $2
${If} $1 = 1
${AndIf} $2 = 0
SectionSetFlags ${g1o3} ${SF_SELECTED}
${EndIf}
FunctionEnd
CF
Sp33dy G0nz4l3s
15th October 2006 16:28 UTC
Wow Thank you CancerFace!!!
It works perfect :) :)