|
|
#1 |
|
Junior Member
Join Date: Oct 2007
Posts: 2
|
Change Section on another section selection
Hi,
I have a question regarding sections, I have one group with two section in it: Group |_Section1 |_Section2 Both sections are optional but I would like to change Section2 as a ReadOnly and Selected when Section1 is clicked. Also when Section1 is deselected, Section2 should go back to its initial state. Is it possible? Thanks for your help Last edited by RaoulOz; 8th October 2007 at 16:18. |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Implement this logic in .onSelChange. This callback function is called whenever the user changes his selection in the components page. So in there you can check if Section1 is selected. If it is, set Section2 as selected and read-only. You can use the macros from Sections.nsh to do that. Namely, look at SelectSection, SetSectionFlag and SF_RO. You can also use the LogicLib to determine if the section is selected - ${If} ${SectionIsSelected} ${section_idx}.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2007
Posts: 2
|
Thank you kichik.
It's what I tried but faced problems, when selecting I couldn't deselct, sometimes I couldn't select at all... So I changed how I will handle it and just hide the necessary section and install the stuff from that section if the other one is selected. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|