Custom Page
I have successfully created a custom page where initially combobox is disabled. The user can enable the combobox by clicking the checkbox. It all works fine except when I return to that page the combobox is still disabled even if I have used the command !insertmacro MUI_INSTALLOPTIONS_WRITE to overwrite the disabled state.
Here is the fragment of the code, could anyone tell me what is wrong?
Function
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE_1)" ""
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "info.ini"
Pop $hwnd
!insertmacro MUI_INSTALLOPTIONS_SHOW
FunctionEnd
Function
...
check_box:
!insertmacro MUI_INSTALLOPTIONS_READ $mycheckbox "info.ini" "Field 7" "State"
StrCmp $mycheckbox 1 enable disable
enable:
GetDlgItem $dlgitem $hwnd 1204 ; PathRequest control (1200 + field 5 - 1)
EnableWindow $dlgitem $mycheckbox
!insertmacro MUI_INSTALLOPTIONS_WRITE "info.ini" "Field 5" "State" "GROUP"
Abort
disable:
GetDlgItem $dlgitem $hwnd 1204 ; PathRequest control (1200 + field 5 - 1)
EnableWindow $dlgitem $mycheckbox
!insertmacro MUI_INSTALLOPTIONS_WRITE "info.ini" "Field 5" "State" "GROUP|DISABLED| "
Abort
...
FunctionEnd