Home All Groups Group Topic Archive Search About

Filling resized panel with form

Author
10 Apr 2006 9:53 PM
Yuk Tang
If I have a panel in which I have placed a maximised form, what's the
easiest way to resize the form to automatically fill the panel when the
panel is resized?  I am using VS 2003.


--
Cheers, ymt.

Author
11 Apr 2006 6:47 AM
Cor Ligthert [MVP]
Yuk,

> If I have a panel in which I have placed a maximised form, what's the
> easiest way to resize the form to automatically fill the panel when the
> panel is resized?  I am using VS 2003.
>
The easiest is the Dock property in every control (in this case use it with
your panel), the second one is the anchor property.

I hope this helps,

Cor
Author
13 Apr 2006 1:00 PM
Yuk Tang
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in
news:egQZdOTXGHA.1196@TK2MSFTNGP03.phx.gbl:
>
> Yuk,
>
>> If I have a panel in which I have placed a maximised form, what's
>> the easiest way to resize the form to automatically fill the
>> panel when the panel is resized?  I am using VS 2003.
>>
> The easiest is the Dock property in every control (in this case
> use it with your panel), the second one is the anchor property.
>
> I hope this helps,

Still no joy unfortunately.  I've tried docking fill, top, left,
bottom, right, anchoring anywhere from here to Timbuktoo, but the
form still gets left behind when the panel is resized.  I would try
playing around with the windowstate property, but it seems to forget
that panel.controls.item(x) is a form once I've exited the procedure
that called it into being and added it to the panel controls
collection, even with option strict on.

One interim solution I'm considering is to stop resizing, which
rather defeats the point of having a frame-based layout. 


--
Cheers, ymt.
Author
13 Apr 2006 3:10 PM
Cor Ligthert [MVP]
Yuk,

If you have let say placed your panel on another panel which is not docked,
than you have the behaviour as you tell.

While when you are docking you should not use the anchor and visa versa.

I hope this helps,

Cor

Show quoteHide quote
"Yuk Tang" <sanewarnebashingexp***@bignet.com.au> schreef in bericht
news:Xns97A48EE1EE5E6jimlaker2yahoocom@130.133.1.4...
> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in
> news:egQZdOTXGHA.1196@TK2MSFTNGP03.phx.gbl:
>>
>> Yuk,
>>
>>> If I have a panel in which I have placed a maximised form, what's
>>> the easiest way to resize the form to automatically fill the
>>> panel when the panel is resized?  I am using VS 2003.
>>>
>> The easiest is the Dock property in every control (in this case
>> use it with your panel), the second one is the anchor property.
>>
>> I hope this helps,
>
> Still no joy unfortunately.  I've tried docking fill, top, left,
> bottom, right, anchoring anywhere from here to Timbuktoo, but the
> form still gets left behind when the panel is resized.  I would try
> playing around with the windowstate property, but it seems to forget
> that panel.controls.item(x) is a form once I've exited the procedure
> that called it into being and added it to the panel controls
> collection, even with option strict on.
>
> One interim solution I'm considering is to stop resizing, which
> rather defeats the point of having a frame-based layout.
>
>
> --
> Cheers, ymt.