Archive: Grouping radio buttons not working


Grouping radio buttons not working
I want to have multiple groups of radio buttons on a custom page I'm creating however things are not working out for me.

Here is the definition of one of the fields from my ini file. It is the first in a group of radio buttons.

[Field 15]
Type=radiobutton
Text=Unknown
Left=190
Right=-1
Top=36
Bottom=43
State=1
Flag=GROUP

This is followed by a few other radio buttons which fall under the same group. This works great, however I have another group of radio buttons following the first group whichc starts off as,

[Field 23]
Type=radiobutton
Text=Unknown
Left=190
Right=-1
Top=97
Bottom=104
Flag=GROUP

All the controls do display but all the radio buttons are grouped together into one larger radio button group whereas I need a few separate smaller groups.


Never tried this before, but have you tried to change the flag variable to another setting for the seperate groups?


Only the first one should get the GROUP flag. Have a look at the example in Contrib\InstallOptions.


The example in the installoptions is easy enough to understand however from what I can tell I have the exact same setup in my ini file only in my case I have a bunch of radio buttons only.

In my ini file I have [Field 15] as the beginning of one set of radio buttons and [Field 23] as the beginning of a new set of radio buttons. So I should have a "GROUP" flag for each of them right?

I did try giving them each a diffent group flag (Flag=GROUP1 and Flag=GROUP2) variable name but that didn't work. I assume NSIS is not setup to handle such things. The radio buttons are all still handled as one big group.


GROUP only adds the window style, so there can be no NSIS limitation.

Can you post the whole INI file?


The files pretty long so I attached it. Hope you guys can help me solve this one.


If you add GROUP flags, everything before the next GROUP flag will be a group. To group radio buttons, the group should only contain radio buttons. So you should add a GROUP flag to the first control after the radio button group too.


That was the problem. Everythings good now. Thanks Joost and viper for your help!


The Archive doesn't seem to contain any Install Options examples, maybe this should be added with some explanation and a screenshot.


I thought of an interesting addition to my original problem. Is there an easy way to tell which radio button is selected out of a group of radio buttons without having to query each radio button in the group?


Nope, you have to check 'em all. A group is just a window flag, InstallOptions does nothing with it.


D'oh!