【问题标题】:nsis disable next button of component pagensis 禁用组件页面的下一个按钮
【发布时间】:2013-05-09 18:53:55
【问题描述】:

我正在使用 nsis 编写安装程序。 在“.onInit”上,我正在检查必备软件是否存在,并基于此我想启用或禁用组件页面的“下一步”按钮。这是我正在尝试的内容

Function .onInit
     ${If} $JavaExists == false ;check if java is installed
          ${OrIf} $TomcatExists == false ;check if tomcat is installed
               ${OrIf} $MysqlExists == false ;check if mysql is installed
               ;code to disable next button of component page
${EndIf}
FunctionEnd

【问题讨论】:

    标签: button nsis next


    【解决方案1】:

    .oninit中不存在组件页面,需要在组件页面的show回调中调用GetDlgItem+EnableWindow...

    【讨论】:

    • 感谢您的回复,但这是那个方法。我找不到show的回调方法
    • 会 !define MUI_PAGE_CUSTOMFUNCTION_SHOW 帮助吗?
    • 是的,如果您使用的是 MUI,如果不是它的页面组件 "" myshow
    【解决方案2】:

    这段代码可以帮助你

    ${NSD_CreateButton} 40% 150 80 14u "Next"
    Pop $BUTTON
    EnableWindow $BUTTON 0--------;; disables button
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-08
      • 2017-09-09
      • 2014-06-17
      • 2014-07-22
      • 2014-11-02
      相关资源
      最近更新 更多