我想根据上面的复选框状态动态创建用户的Textinput。
我试过这样的事情:
...
Function nsDialogsPage
nsDialogs::Create 1018
${NSD_CreateCheckBox} 20u 55u 50% 20u "Download with Proxy"
Pop $testBox
${NSD_OnClick} $testBox button_click
nsDialogs::Show
FunctionEnd
Function button_click
${NSD_GetState} $testBox $6
${If} $6 == 1
${NSD_CreateText} 20u 75u 80% 25p "Enter your Proxy ..."
${Else}
;Remove the Text, Set it invisible or do something like this ...
${EndIf}
FunctionEnd
Function nsDialogsPageLeave
;does something with the input
FunctionEnd
我在http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html和{{}}上找不到任何内容 我不知道如何移除Box或使其对用户或类似的东西不可见,当取消选中CheckBox时他无法输入任何内容。
答案 0 :(得分:2)
${NSD_CreateText} 20u 75u 80% 25p "Enter your Proxy ..."
Pop $myText
#disable control
EnableWindow $myText 0
#enable control
EnableWindow $myText 1
#hide control
ShowWindow $myText 0
#show control
ShowWindow $myText 1