I modifief the Modern UI InstallOptions.nsi example a bit.
Now Custom Page C has a dirrequest.
Both the dirrequest and the label are dependent of the checkbox. This means they should become disabled/enabled when the checkbox is toggled.
I tried to do this by adding the ValidatePageC Function.
However this does not seem to work. Should I maybe refresh the custom page after writing the values to the ini file?
Thanks already
Problem with MUI and checkbox notifying
10 posts
Here is the source
See Contrib\InstallOptions\testnotify.nsi
-Stu
-Stu
The only difference between my script and the testnotity.nsi seems to be this piece of code which I now included;
ReadINIStr $4 "ioC.ini" "Field 1" "HWND"
EnableWindow $4 $1
ReadINIStr $4 "ioC.ini" "Field 1" "HWND2"
EnableWindow $4 $1
ReadINIStr $4 "ioC.ini" "Field 3" "HWND"
EnableWindow $4 $1
ReadINIStr $4 "ioC.ini" "Field 3" "HWND2"
EnableWindow $4 $1
But it still doesn't work,
should I maybe do something special because I use MUI?
New code is attached
ReadINIStr $4 "ioC.ini" "Field 1" "HWND"
EnableWindow $4 $1
ReadINIStr $4 "ioC.ini" "Field 1" "HWND2"
EnableWindow $4 $1
ReadINIStr $4 "ioC.ini" "Field 3" "HWND"
EnableWindow $4 $1
ReadINIStr $4 "ioC.ini" "Field 3" "HWND2"
EnableWindow $4 $1
But it still doesn't work,
should I maybe do something special because I use MUI?
New code is attached
I don't think you can use variables for the EnableWindow state parameter. Try moving them to under your ${If} structure with constants 0 and 1 instead of $1.
-Stu
-Stu
Tried this,
but still no results.
but still no results.
You should think something like this.
I think.
FindWindow $R1 "#32770" "" $HWNDPARENT
GetDlgItem $1 $R1 1208
EnableWindow $1 1 0
I think.
FindWindow $R1 "#32770" "" $HWNDPARENT
GetDlgItem $1 $R1 1208
EnableWindow $1 1 0
In the testnotity.nsi none of this is used,
I was wondering wether this has anything to do with the fact I use MUI and the testnotify.nsi doesn't.
Does someone maybe notice any difference between testnotify.nsi and my example?
I was wondering wether this has anything to do with the fact I use MUI and the testnotify.nsi doesn't.
Does someone maybe notice any difference between testnotify.nsi and my example?
Problems:
Function ValidatePageC
!insertmacro MUI_INSTALLOPTIONS_READ $0 "ioC.ini" "Settings" "State"
${If} $0 == 2
;Read checkbox state
!insertmacro MUI_INSTALLOPTIONS_READ $1 "ioC.ini" "Field 2" "State"
;Enable/Disable DirRequest
!insertmacro MUI_INSTALLOPTIONS_READ $0 "ioC.ini" "Field 3" "HWND"
EnableWindow $0 $1
!insertmacro MUI_INSTALLOPTIONS_READ $0 "ioC.ini" "Field 3" "HWND2"
EnableWindow $0 $1
Abort
${EndIf}
FunctionEnd
You weren't checking if NOTIFY was sent.
You were using ReadINIStr instead of MUI_INSTALLOPTIONS_READ.
-Stu
This was the problem,
now it works.
Thanks a lot!
now it works.
Thanks a lot!