jdt2oo7
15th December 2009 23:14 UTC
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
MSG
16th December 2009 08:39 UTC
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
jdt2oo7
16th December 2009 17:41 UTC
Cool, thanks MSG!
Is there a way to keep the text description of the checkbox not gray out when the checkbox is disabled?
jiake
21st December 2009 18:29 UTC
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.
jdt2oo7
21st December 2009 18:31 UTC
Thanks jiake! That what I did :-)