Old 12th September 2008, 21:44   #1
DukeBrymin
Junior Member
 
Join Date: Sep 2008
Posts: 5
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
DukeBrymin is offline   Reply With Quote
Old 12th September 2008, 22:05   #2
demiller9
Senior Member
 
Join Date: Mar 2006
Location: Dallas
Posts: 462
No, you cannot create and check it in one statement. You are doing it the right way now.
demiller9 is offline   Reply With Quote
Old 12th September 2008, 22:10   #3
DukeBrymin
Junior Member
 
Join Date: Sep 2008
Posts: 5
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
DukeBrymin is offline   Reply With Quote
Old 12th September 2008, 22:29   #4
demiller9
Senior Member
 
Join Date: Mar 2006
Location: Dallas
Posts: 462
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.
demiller9 is offline   Reply With Quote
Old 15th September 2008, 15:29   #5
DukeBrymin
Junior Member
 
Join Date: Sep 2008
Posts: 5
Thanks!! That's working perfectly.
DukeBrymin is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump