Filling resized panel with form

  • Thread starter Thread starter Yuk Tang
  • Start date Start date
Y

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.
 
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
 
Cor Ligthert said:
Yuk,

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.
 
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
 
Back
Top