Archive: InstallOptions and check boxes


InstallOptions and check boxes
I've look through the documentation on this and couldn't find anything

so I was wondering if its possible

to my problem, I have a custom page with two check boxed, is it possible when you check one box, the other box is unchecked and visa versa

so only one box is checked at one time

if so what do I need to change?

this is the ini file

[Settings]
NumFields=4

[Field 1]
blah
and so on

[Field 2]
blah
and so on

[Field 3]
Type=checkbox
Text= Blah
Left=10
Right=-10
Top=40
Bottom=50
State=1

[Field 4]
Type=checkbox
Text= blah2
Left=10
Right=-10
Top=60
Bottom=70
State=1

and these are the lines from the script

!insertmacro MUI_INSTALLOPTIONS_READ $MUI_TEMP "blah.ini" "Field 3" "State"
StrCmp $MUI_TEMP "1" "" +2
SetOutPath "$PROGRAMFILES\blah"
File "blah1"

!insertmacro MUI_INSTALLOPTIONS_READ $MUI_TEMP "Cannons.ini" "Field 4" "State"
StrCmp $MUI_TEMP "1" "" +2
SetOutPath "$PROGRAMFILES\blah"
File "blah2"


Cheers

-Tony


If you only want to allow one check box to be selected at a time, have you considered using radio buttons instead? If you have two radio buttons in a group then only one button can be selected at a time.


I didn't know that, make things a little better

Just tried it it works fine

only thing I had to do wat to set field 4 state to =0
Thanks again :)


thanks, I didn't know that option either :D