I used the dialog designer to generate a dialog.
I have 3 checkboxes and would like to enable #2 and #3 only if #1 is checked.
these are the functions:
and I call them like:
Function fnc__1_Create
; === _1 (type: Dialog) ===
nsDialogs::Create 1018
Pop $hCtl__1
${If} $hCtl__1 == error
Abort
${EndIf}
; === CheckBox3 (type: Checkbox) ===
${NSD_CreateCheckbox} 68 192 291 18 "this is checkbox 3"
Pop $hCtl__1_CheckBox3
${If} $hCtl__1_CheckBox3_state == ${BST_CHECKED}
${NSD_Check} $hCtl__1_CheckBox3
${EndIf}
; === CheckBox2 (type: Checkbox) ===
${NSD_CreateCheckbox} 68 174 243 18 "this is checkbox 2"
Pop $hCtl__1_CheckBox2
${If} $hCtl__1_CheckBox2_state == ${BST_CHECKED}
${NSD_Check} $hCtl__1_CheckBox2
${EndIf}
; === CheckBox1 (type: Checkbox) ===
${NSD_CreateCheckbox} 46 155 233 23 "this is checkbox 1"
Pop $hCtl__1_CheckBox1
${If} $hCtl__1_CheckBox1_state == ${BST_CHECKED}
${NSD_Check} $hCtl__1_CheckBox1
${EndIf}
${NSD_Check} $hCtl__1_CheckBox1
FunctionEnd
; dialog show function
Function fnc__1_Show
Call fnc__1_Create
nsDialogs::Show $hCtl__1
FunctionEnd
; function to remember the selections made in case of back to previous page
Function nsDialogsPageLeave
${NSD_GetState} $hCtl__1_CheckBox1 $hCtl__1_CheckBox1_state
${NSD_GetState} $hCtl__1_CheckBox2 $hCtl__1_CheckBox2_state
${NSD_GetState} $hCtl__1_CheckBox3 $hCtl__1_CheckBox3_state
FunctionEnd
will be glad to have some help,
Page custom fnc__1_Show nsDialogsPageLeave
Thx
G