Solved

C# Set container on Group box

Posted on 2011-09-28
4
348 Views
Last Modified: 2012-05-12
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?
0
Comment
Question by:jetbet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 36719891
Start with a large form--grotesquely large  ; )

Drag each panel you want to create onto the form, but in different places. Set up each panel how you like. Once you do that, select all the panels and use the alignment toolbar to align the panels by top and left edge (see screenshot). You can also set the sizes of all the panels to one value while you have them selected. Once you finish, size your form accordingly.
untitled.PNG
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36719899
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.
0
 

Author Closing Comment

by:jetbet
ID: 36719963
Works a treat. Thanks
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36720020
NP. Glad to help  = )
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question