DukeBrymin
12th September 2008 22:44 UTC
Checkboxes defaulting to checked
I'm trying to figure out how to get my checkboxes to default to on. I can do the following:
${NSD_CreateCheckbox} 5% 25u 30% 10u ".jou"
Pop $CheckboxJou
${NSD_Check} $CheckboxJou
but is there a way to set it checked when it's created?
Thanks
demiller9
12th September 2008 23:05 UTC
No, you cannot create and check it in one statement. You are doing it the right way now.
DukeBrymin
12th September 2008 23:10 UTC
Okay, I can deal with that, but it brings up another issue. I've used the example given in the nsDialog tutorial, to make it so if the User navigates back to this page, his choices are selected. But, I can't figure out how to make them checked by default when first entering the page, but retain the user's settings if he returns to the page later.
Is there a way to do this?
thanks
demiller9
12th September 2008 23:29 UTC
I use .onInit to decide what settings/current configuration exists and set variables for that. Then when creating the page I can use those variables to preselect the way that page looks. When the user leaves the page I read the controls and update the variables. If the user goes back, the variables 'remember' their choices and they will be redisplayed.
DukeBrymin
15th September 2008 16:29 UTC
Thanks!! That's working perfectly.