Search code examples
nsis

NSIS: back, next and cancel buttons are disabled in custom page


I am trying to create a custom page with NSIS. but when I run the installer, all the buttons are in shadow and not working.

Function licensePage

  ${NSD_CreateLabel} 0 0u 100% 12u "Please enter license key"
  ${NSD_CreateText} 0% 20u 100% 12u ""
  Pop $licenseKey

  ${NSD_CreateLabel} 0 40u 100% 12u "Please enter database password"
  ${NSD_CreateText} 0% 60u 100% 12u ""
  Pop $dbPass
  
  nsDialogs::Show
FunctionEnd

the custom page is so basic.


Solution

  • to enable next button you have to add these lines

    GetDlgItem $0 $HWNDPARENT 1 ; 1 is the ID of the Next button
    EnableWindow $0 1