英文:
NSIS: back, next and cancel buttons are disabled in custom page
问题
以下是您要翻译的代码部分:
Function licensePage
${NSD_CreateLabel} 0 0u 100% 12u "请输入许可密钥"
${NSD_CreateText} 0% 20u 100% 12u ""
Pop $licenseKey
${NSD_CreateLabel} 0 40u 100% 12u "请输入数据库密码"
${NSD_CreateText} 0% 60u 100% 12u ""
Pop $dbPass
nsDialogs::Show
FunctionEnd
英文:
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.
答案1
得分: 0
你遗漏了创建调用。
Page custom nsDialogsPage
Page instfiles
Function nsDialogsPage
nsDialogs::Create 1018
Pop $0
${If} $0 == error
Abort
${EndIf}
${NSD_CreateLabel} 0 0 100% 12u "你好,欢迎使用nsDialogs!"
Pop $0
nsDialogs::Show
FunctionEnd
英文:
You are missing the Create call.
Page custom nsDialogsPage
Page instfiles
Function nsDialogsPage
nsDialogs::Create 1018
Pop $0
${If} $0 == error
Abort
${EndIf}
${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
Pop $0
nsDialogs::Show
FunctionEnd
答案2
得分: 0
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
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论