Archive: Change Section on another section selection


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


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}.


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.