Home All Groups Group Topic Archive Search About

How best create Windows form for dragging bigger/smaller?

Author
3 Mar 2006 5:48 AM
Ronald S. Cook
What is the best way to structure my Windows form so that when it is dragged
bigger (i.e. maximized) or smaller, the controls will reorganize themselves
"properly"?



Assume I have 4 logical sections of controls.  Do I create 4 panels and dock
them a certain way?  I'm just looking for the most normal/best practice.



Thanks very much,

Ron

Author
3 Mar 2006 6:44 AM
Homer J Simpson
"Ronald S. Cook" <rc***@westinis.com> wrote in message
news:e%23%23$MYoPGHA.564@TK2MSFTNGP10.phx.gbl...
> What is the best way to structure my Windows form so that when it is
> dragged bigger (i.e. maximized) or smaller, the controls will reorganize
> themselves "properly"?

Use Anchor or Dock appropriately. If that isn't enough, code it.

Show quoteHide quote
> Assume I have 4 logical sections of controls.  Do I create 4 panels and
> dock them a certain way?  I'm just looking for the most normal/best
> practice.
Author
3 Mar 2006 1:07 PM
Herfried K. Wagner [MVP]
"Ronald S. Cook" <rc***@westinis.com> schrieb:
> What is the best way to structure my Windows form so that when it is
> dragged bigger (i.e. maximized) or smaller, the controls will reorganize
> themselves "properly"?


First, take a look at the controls' 'Dock' and 'Anchor' properties.

If you are using .NET 2.0:

Check out the FlowLayoutPanel and TableLayoutPanel controls, which are
avialable on the "Containers" tab of VS 2005's toolbox.

..NET 1.0/1.1:

Simple Layout Managers
<URL:http://www.dotnet.jku.at/projects/slm/>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>