Components page check box problem.
Hi,
I search through the forum for this issue but i couldn`t find the answer for this one.
I`ve made a components page with checkboxes: the first one is read-only and checked, the second one is an optional one and the last one is a forced one.
The last one (the forced check box) is actually a group of check boxes. I set it so the user can check only one of them. So far so good but if the user clicks on the section group 3 of them get selected.
Here is the code:
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE "ComponentsLeave"
!insertmacro MUI_PAGE_COMPONENTS
Section "!First Check Box" 01
SectionIn RO ;Make this section Read-Only
.....Some files.....
SectionEnd
Section /o "Second Check Box" 02
SectionEnd
SectionGroup /e "Third Check Box" 03
Section /o "One" 031
SetOverwrite on
SetOutPath $INSTDIR
SectionEnd
Section /o "Two" 032
SetOverwrite on
SectionEnd
Section /o "Three" 033
SetOverwrite on
SectionEnd
Section /o "Four" 034
SetOverwrite on
SectionEnd
SectionGroupEnd
Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${031}
!insertmacro RadioButton ${032}
!insertmacro RadioButton ${033}
!insertmacro RadioButton ${034}
!insertmacro EndRadioButtons
;!insertmacro SetSectionFlag ${03} ${SF_RO}
IntOp $2 ${SF_SELECTED} | ${SF_RO}
SectionSetFlags ${01} $2
FunctionEnd
Function ComponentsLeave
SectionGetFlags "${031}" $0
StrCmp $0 1 End
SectionGetFlags "${032}" $0
StrCmp $0 1 End
SectionGetFlags "${033}" $0
StrCmp $0 1 End
SectionGetFlags "${034}" $0
StrCmp $0 1 End
MessageBox MB_OK|MB_ICONINFORMATION "You must select at least one section."
Abort
End:
FunctionEnd
The thing is if i click on "One", only that is selected; if i click on "Two", only that is selected, and so on. But if i click on "Third Check Box", then, "One", "Two" and "Three" are checked and "Four" is unchecked. If i click again on "Third Check Box" same thing happens but only "One", "Two" and "Four" are checked and "Three" is unchecked.
Do you have any ideas for this? :(