sectiongroup
hello,
is it possible to hide a sectiongroup ?
i know how to hide a section
i know how to disable a section / sectiongroup
but how to disable a sectiongroup ?
i tried with "SectionSetText" but it does not work.
thanks.
Archive: sectiongroup
sectiongroup
hello,
is it possible to hide a sectiongroup ?
i know how to hide a section
i know how to disable a section / sectiongroup
but how to disable a sectiongroup ?
i tried with "SectionSetText" but it does not work.
thanks.
but how to hide a sectiongroup ?
sorry, i can't edit my post.
Hide the section group, all its children and the hidden section group end. To hide it, you'll also need to remove its SF_SECGRP flag.
thanks for the reply... but
i am sorry, but i do not understand.
i have the following layout :
SectionGroup(1)
|---SectionGroup(2)
| |
| |---Section(a)
| |
| |---SectionGroup(3)
| | |
| | |---Section(b)
| | |
| | |---Section(c)
| |
| |---Section(d)
|
|---SectionGroup(4)
| |
| |---Section(e)
| |
| |---Section(f)
|
|---Section(f)
SectionSetText SecGroupID "" will not work because "SecGroupID" is not a valid section identifier. You must use ${SecGroupID}.
thanks for the quick reply. you really saved my life !
it works. only one problem
now it looks like this:
SectionGroup(1)
SectionGroup(4)
|
|---Section(e)
|
|---Section(f)
Section(g)
after testing it a little, it works if i move sectiongroup(2) after sectiongroup(4) and section(g).
is this normal ?
and one more question,
if i hide the sections and they are selected by default, they will get installed anyway ?
i must use [SectionSetFlags ${SecID} "0"] ?
thanks.
OJi.
SF_SECGRP is a section flag just like SF_SELECTED. See Include\Sections.nsh for its definition. That's what causing the weird section behaviour you see. That and the section group end you didn't remove.
If you hide a section and it's still selected, it will be installed.
thanks for all the help, but i am still! doing something wrong. no matter what i do it still looks like this:
SectionGroup(1)
SectionGroup(4)
|
|---Section(e)
|
|---Section(f)
Section(g)
here is the script.i don't know if i can attach files not being registered so i will put it here. i want to hide group 1.1.
thanks in advance.
OJi
OutFile "forum.exe"
SectionSetText ${Sec11c} ""
>!include "MUI.nsh"
>!include "Sections.nsh"
>!define MUI_COMPONENTSPAGE_NODESC
>!insertmacro MUI_PAGE_COMPONENTS
>!insertmacro MUI_LANGUAGE "English"
>SectionGroup /e "!(group) 1" Sec1
SectionGroup"(group) 1.1" Sec11
Section"(section) 1.1.a" Sec11a
SectionIn 1
SectionEnd
Section"(section) 1.1.b" Sec11b
SectionIn 1
SectionEnd
Section"(section) 1.1.d" Sec11c
;bla
SectionEnd
SectionGroupEnd
Section"(section) 1.d" Sec1d
;bla
SectionEnd
Section"(section) 1.e" Sec1e
SectionIn 1
SectionEnd
SectionGroupEnd
SectionGroup/e "!(group) 2" Sec2
Section"(section) 2.f" Sec2f
SectionIn 1
SectionEnd
SectionGroupEnd
SectionGroup/e "!(group) 3" Sec3
Section"(section) 3.g" Sec3g
SectionIn 1
SectionEnd
SectionGroupEnd
>Function .onInit
;!insertmacro ClearSectionFlag ${Sec11c} ${SF_SELECTED}
;
;!insertmacro ClearSectionFlag ${Sec11b} ${SF_SELECTED}
;SectionSetText ${Sec11b} ""
;!insertmacro ClearSectionFlag ${Sec11a} ${SF_SELECTED}
;SectionSetText ${Sec11a} ""
;!insertmacro ClearSectionFlag ${Sec11} ${SF_SECGRP}
;!insertmacro ClearSectionFlag ${Sec11} ${SF_SECGRPEND}
;SectionSetText ${Sec11} ""
>FunctionEnd
>
You didn't remove the section group end marker. Add:
IntOp $0 ${Sec11c} + 1
!insertmacro ClearSectionFlag $0 ${SF_SECGRPEND}
SectionSetText $0 ""
As for your e-mail, the forum had some mail server problems. I have resent your activation mail. If you don't get it in the next couple of days, let me know.
thanks for all the help. it is working.
i received the email.
thanks again.