Link to home
Start Free TrialLog in
Avatar of jetbet
jetbetFlag for New Zealand

asked on

C# Set container on Group box

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?
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
P.S.

The control whose border has white dots will be the control all other controls (black dots) will be aligned to. In my screenshot, the right panel would be aligned to the left panel's left and top.
Avatar of jetbet

ASKER

Works a treat. Thanks
NP. Glad to help  = )