In .Net v2 when a form is resized is it possible to automatically
resize controls such as panels and datagridviews?

Re: Forms Resizing by Havard

Havard
Fri Jan 19 09:43:35 CST 2007


robin9876@hotmail.com wrote:
> In .Net v2 when a form is resized is it possible to automatically
> resize controls such as panels and datagridviews?

Several options exist:
- Resize your controls manually by handling the Resize event.
- Use the Anchor and/or Dock properties on your controls to make them
resize and position themselves where you want them to.

MSDN has the documentation for you. :)

--=20
H=E5vard


Re: Forms Resizing by robin9876

robin9876
Mon Jan 22 06:42:23 CST 2007

I have handled it code on the form resize event, due to the layout of
the form and the options available with Anchor and dock settings.

Havard Stranden wrote:
> robin9876@hotmail.com wrote:
> > In .Net v2 when a form is resized is it possible to automatically
> > resize controls such as panels and datagridviews?
>
> Several options exist:
> - Resize your controls manually by handling the Resize event.
> - Use the Anchor and/or Dock properties on your controls to make them
> resize and position themselves where you want them to.
>=20
> MSDN has the documentation for you. :)
>=20
> --=20
> H=E5vard


Re: Forms Resizing by Oliver

Oliver
Sat Jan 27 11:15:36 CST 2007

Hello robin9876,

>In .Net v2 when a form is resized is it possible to automatically
>resize controls such as panels and datagridviews?

The mechanisms suggested by others in replies to this question are really
those that were commonly used in .NET 1. In .NET 2, several new and
powerful controls have been introduced in the form of the layout
containers. You should have a look at MSDN docs for the FlowLayoutPanel
and the TableLayoutPanel to find out how these work.


Oliver Sturm
--
http://www.sturmnet.org/blog