Old 15th January 2010, 16:42   #1
wuschel
Junior Member
 
Join Date: Jan 2010
Posts: 4
comonents select on custom page?

I want only one Componente turn off or on. Can i make this on the custom page?
Or if this is not possible to add a text query into the components page?
With components and custom page works the script. I would like to save one of the two sides.

Thank for your help!
wuschel
wuschel is offline   Reply With Quote
Old 15th January 2010, 18:01   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
It's very difficult to understand what you want to accomplish...

1) If you mean you want only one section out of several sections to be selectable by the user, you should either make the other sections invisible (start their name with a '-' dash) or set them to readonly (add the line 'SectionIN RO' in the section).
2) If you want the user to select a signle ON/OFF option, you can create a custom page with nsDialogs that contains a checkbox, or use a Yes/No MessageBox.
3) If you want to enable/disable an existing section depending on what the user chooses, you can use the SelectSection and UnSelectSection macros in Sections.nsh.
MSG is offline   Reply With Quote
Old 15th January 2010, 18:18   #3
wuschel
Junior Member
 
Join Date: Jan 2010
Posts: 4
point 2) thats rigth.
Yes I will with nsDialogs and a checkbox of custume page one section select on/of
can you give a code example for this?
wuschel is offline   Reply With Quote
Old 15th January 2010, 19:46   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
To learn how to use nsDialogs, please consult the nsDialogs readme. It has a beginner's walkthrough that should help you get underway.

http://nsis.sourceforge.net/Docs/nsDialogs/Readme.html
MSG is offline   Reply With Quote
Old 16th January 2010, 04:37   #5
wuschel
Junior Member
 
Join Date: Jan 2010
Posts: 4
I can works with nsDialogs. I do not have to code so that to activate a section or not. At this link, there is no example for this. I only know how to deal with the componets page to enable sections or not. With what command can I on a custom page sections(Components) aktivate or not.
Thanks wuschel
wuschel is offline   Reply With Quote
Old 16th January 2010, 07:56   #6
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Like I said, you can enable and disable a section using the macros in Sections.nsh.

But a simpler idea would be to set a global variable in the custom page's leave function, depending on the state of the checkbox. Then in your installer section, put the entire stuff in an ${If} $YourCheckboxVariable == 1 (...) ${EndIf} .
MSG is offline   Reply With Quote
Old 16th January 2010, 13:34   #7
wuschel
Junior Member
 
Join Date: Jan 2010
Posts: 4
thanks it`s run

with
${NSD_CreateCheckbox} 10 40 50% 6% "........."
Pop $hwnd
${NSD_OnClick} $hwnds EnSelectSection

and

Function EnSelectSection
Pop $hwnd
${NSD_GetState} $hwnd $0
${If} $0 == 1
!insertmacro SelectSection SEC_Name
${EndIf}
FunctionEnd

I was search for this code:
!insertmacro SelectSection SEC_Persistent
wuschel 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