Solved

C# Set container on Group box

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Loop not working 29 53
Vb.net dynamic formulas in runtime 11 74
Turn on intranet settings 1 55
updating order of the rows, N+1 query issue, C#, asp.net, MVC, SQL Server 3 25
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…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

816 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

11 Experts available now in Live!

Get 1:1 Help Now