Identify members of a control set from the master class

I am devising a custom radio button. I want it to behave like the standard control, that is when instances are in a control set, if one is clicked, the others are deselected.

I have been toying with different ideas to “see” the different members from the master class, but none seem terribly satisfactory. When a member is clicked, I do get its index value, but I found no simple idea to get all members to report.

So far, the only idea that works is to cycle through the controls on the window, and when I encounter my control instances, place them in a dictionary, so I have a reference and can set on or off the button. That works well if I have only one series of buttons in a control set. But what if I have two, three or more different control sets on the same window ? How do I distinguish between control sets ?

Of course the CLASS never is.
Only instances of it on a layout are.
And those instances are a set using the instance name - not the class name.
You might be able to use introspection on the instance to get its name & index (which will be >=0 for a control set member and
-maxint (I forget the exact value for this) on non-members
But to get the other members the instance has no direct access to them
You have to go through the owning window etc to get access to them

That is what I will do, then.

Thank you Norman.

Except that’s not how radio buttons work. It doesn’t matter if they’re part of a control set or not, it’s the Parent that makes them act like a set. 2 control sets on the same parent control = 1 set of radio buttons. 1 control set on 2 different parents = 2 sets of radio buttons.

You are right. Back to the drawing board. Thanks.