mythprod
6th October 2009 15:48 UTC
checking one box unchecks another
Greetings! I've been searching help and forums for an answer and still haven't found a solution. In my installer I'm using Modern UI 2 and the component page typically lists 3-8 options for the user to select. Currently my installer allows the user to check multiple items, but I'd really only like to allow them one at a time. Checking one unchecks another (if one is checked).
Any easy way to pull this off? Any references to help or topic links would be great!
Thanks!
TrifonovS
7th October 2009 07:33 UTC
You can write several lines to do that. The code must be in the call-back function .onSelChange (or un.onSelChange) which is called when the selection is changed. In the body of the function you can use SectionGetFlags to get the state (see the documentation). Then you have to program a simple logic with the state and at the end you have to use SectionSetFlags to put the flags back. That's all.
MSG
7th October 2009 08:30 UTC
There's also the StartRadioButtons, RadioButton and EndRadioButtons macros in Sections.nsh.