Archive: Dynamically hide a section...


Dynamically hide a section...
I have searched the forum and I can't seem to find any reference to dynamically hiding (or unhiding) a section.

I take it that I cannot do this...correct?

:(

Thanx!

jc3


This can be done dynamically like so...

Section "My Section" MySec
...
SectionEnd


!include Sections.nsh

Function Blah

;Enable section
!insertmacro SelectSection "${MySec}"

;Disable section
!insertmacro UnselectSection "${MySec}"

FunctionEnd


-Stu

there is an example in the archive.


Thanks Stu,

I knew how to select and unselect a checkbox. :)

I was looking for the equivalent of:

Section "-My Section" MySec
...
SectionEnd


Dynamic invisible vs. visible. I really appreciate your help though. I've noticed that you’re always the first to lend a hand when some asks for help. I really appreciate that! :up:

Thanks Yathosho,

The link to the example you sent had exactly what I was looking for. :D The title mislead me at first, but it was perfect.

I've read through the help for NSIS and the Readme for MUI in there entirety, but it never dawned on me that setting the sections text to "" would make it hidden.

SectionSetText ${secName} ""

I'll read through both of the docs again this weekend. :o

Thanks again.

jc3