Prev Previous Post   Next Post Next
Old 20th December 2005, 12:01   #1
Fretje
Junior Member
 
Join Date: Nov 2005
Posts: 13
Sections and subsections

Hello,
I want to achieve something simple, but I don't get it to work like I want to.
I have 2 sections "section1" and "section2". Section2 can not be installed without section1.
So I thought I make them displayed in the components page like the attached picture.

I have done this using the following code:

SectionGroup /e "Section1" SEC1Group
Section "-Section1" SEC1
...
SectionEnd
Section "Section2" SEC2
...
SectionEnd
SectionGroupEnd

This way I thought the behaviour I described above will be automatically implemented, because I thought when a section of a particular sectiongroup is selected, the sectiongroup itself is also selected. But this seems not to be the fact.
When the group is de-selected first, both checkboxes are de-selected, then afterwards the "section2" section can be checked, and the section1 checkbox gets grey (like a 3-state checkbox in the 3rd state). I want it to be checked plain (all the subgroups are checked, so the group should be checked).

Then I thought I override the .OnSelChange as follows:

Function .onSelChange
!insertmacro SectionFlagIsSet ${SEC2} ${SF_SELECTED} endOnSelChange selectSection1
selectSection1:
!insertmacro SelectSection ${SEC1}
endOnSelChange:
FunctionEnd

But this makes it unable to de-select group1.

Am I missing something here? Or is there another way of doing this?

Any help appreciated!

Greetings,

Fretje
Attached Images
File Type: gif screenshot.gif (9.9 KB, 382 views)
Fretje is offline   Reply With Quote
 
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