Archive: Can't disable a checkbox


Can't disable a checkbox
Hi all,

I need to create a checkbox, have it checked, then display on a custom page. I am not able to disable the checkbox at the moment. Thanks for your help!

----
${NSD_CreateCheckbox} 0 80 180 25 "My application"
EnableWindow $Checkbox1 0
Pop $Checkbox1


Errr... You can't use a variable before you set it.

Try:
${NSD_CreateCheckbox} 0 80 180 25 "My application"
Pop $Checkbox1
EnableWindow $Checkbox1 0


Cool, thanks MSG!

Is there a way to keep the text description of the checkbox not gray out when the checkbox is disabled?


You may create a single checkbox without any text, and create a label on the right.

${NSD_CreateCheckbox} 0u 0u 300u 8u "Checkbox1"
${NSD_CreateCheckbox} 0u 15u 8u 8u ""
${NSD_CreateLabel} 10u 15u 290u 8u "Checkbox2"
But, in this way, the checkbox will not be checked by click on the text area, only in the box.

Thanks jiake! That what I did :-)