C# Set container on Group box
Posted on 2011-09-28
I have a form that contains multiple panels.
On one Panel (PA_Main) I have a set of group boxes whose visibility attribute are set depending on a set of radio buttons on the panel.
What I would like to do is have all the Group boxes sitting over top of each other so that as each is made visible it appears in the same place as the previous one.
The trouble is that by putting one directly on top of another it becomes contained in the other by default and so shares the visibility with the one it is placed on top of.
If I offset the group boxes in the IDE slightly so I can select them individually, I can "Right Click" on them and select "Select 'PA_Main'".
This seems to set the container OK and so the visibility selection works correctly.
The trouble is that as the selectied Group Box changes it moves slightly on the form because of the offset.
How can I set the container of each Group Box so that I can put them one on top of the other?