Solved

C# Set container on Group box

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

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 74

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 74

Expert Comment

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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

23 Experts available now in Live!

Get 1:1 Help Now