Solved

C# Set container on Group box

Posted on 2011-09-28
4
339 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
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 …

919 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now