epileg
11th April 2013 17:42 UTC
enable/disable "next" button on "Choose Components" page
Hello,
Using MUI2, on "Choose Components" page, if the user uncheck everything, "next" button is disabled.
But if the user press "back" and "next", the next button is enabled even if everything is unchecked.
I've added:
...
!define MUI_PAGE_COMPONENTS_SHOW SetNextButton
...
!insertmacro MUI_PAGE_COMPONENTS
...
Function SetNextButton
.onSelChange
FunctionEnd
...
But this break the building process :confused:
Any comment will be welcome.
I'm a newbie on NSIS
Anders
11th April 2013 19:02 UTC
Edit:
!include MUI.nsh
!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_SHOW SetNextButton
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English
Function .onSelChange
MessageBox mb_ok "disable next button here if required"
FunctionEnd
Function SetNextButton
Call .onSelChange
FunctionEnd
Afrow UK
11th April 2013 19:15 UTC
Are you trying to call .onSelChange? You need to use Call.
Stu
epileg
11th April 2013 19:45 UTC
Anders, your code worked as a charm!
Many many thanks! :)