Hi
I've got the following section/sectiongroup structure:
SectionGroup /e "Products"
Section "Product 1"
SectionIn RO
SectionEnd
Section "Product 2"
SectionIn RO
SectionEnd
SectionGroupEnd
This is purely for display purposes for the user, to indicate which applications are being installed. All the sections are readonly and selected, because I don't want the user to change them; so the corresponding checkboxes appears as selected but disabled - as I want.
However, the checkbox for the Products group is appearing as selected, but enabled (i.e. not greyed out). In spite of it being not greyed out, the user can't actually toggle the selection - nothing happens when you click on it.
What I want is for the Products check box is to appear disabled, just like the other checkboxes.
So it's currently got the required behaviour, but not the required appearance.
See the attached screenshot for what I'm trying to explain above.
Thanks,
Calum
SectionIn RO and SectionGroup
4 posts
Try this code in .onInit:
SectionGroup /e "Products" sgm
Edit:
Or you can use this code
Where sgm is sectiongroup index:
SectionGetFlags ${sgm} $8
IntOp $8 $8 | ${SF_RO}
SectionSetFlags ${sgm} $8
SectionGroup /e "Products" sgm
Edit:
Or you can use this code
And don't forget
!insertmacro SetSectionFlag ${sgm} ${SF_RO}
!include Sections.nsh
Also remember to !include Sections.nsh too.
With Sections.nsh you could simply use:
SectionGroup /e "Products" secProducts
...
!insertmacro SetSectionFlag ${secProducts} ${SF_RO}
Note: I'm not sure if you can disable a SectionGroup check-box.
Edit: You should put the !insertmacro in the .onInit function.
-Stu
With Sections.nsh you could simply use:
SectionGroup /e "Products" secProducts
...
!insertmacro SetSectionFlag ${secProducts} ${SF_RO}
Note: I'm not sure if you can disable a SectionGroup check-box.
Edit: You should put the !insertmacro in the .onInit function.
-Stu
Excellent - that worked perfectly!
Thank you both.
Calum
Thank you both.
Calum