That is great when Radio buttons of same group can be in rows or cols, but what if radio buttons must be shown in an X style (or in a more complex way):
A B
C D
Restrictions for that X style sample i put:
- A has relation with D (A and D can not be checked at same time, checking one unchecks the other)
- C has relation with B (C and B can not be checked at same time, checking one unchecks the other)
It is visually required as that, in an X style, so i can not put any GroupBox that holds that RadioButton, since GroupBox are rectangular, not diagonal.
I do not know any fix only using standard components, among there is a hack to make panels visually transparent and also click through able, so both panels are a square, one over the other.
But what about having the radio buttons very far one from the other,with a lot of complex components, flow panels, memos, etc?
The only option is to use third party components (at last up to what i know) or to do a lot of hard work:
- Create a panel for each RadioButton with exact same size and position as the RadioButton; this makes radio button to not uncheck any other, so more code is needed.
- Add code for each RadioButton, so when it is checked execute an uncheck on all the ones that are related with it (the ones that must not be checked at same time).
Too much work for something that could had been implemented on a simple property like RadioGroupIndex, if assigned a value of 0 then work as they work now, else uncheck only the ones for that same group... like on main menus.