I am embedding a form into a panel control using pnl.Controls.Add(form);
This works pretty well, however there is one problem.
The panel can resize, so there are cases when the panel size is smaller than
the form embeded in it. The framework handles this problem by showing only a
piece of the form that fits in the panel. Is there a way to add scroll bars
to the panel so that the user can view the entire embedded form without
resizing the panel?
Is there any piece of code that handles this whole situation?
Thank you
Cezar Mart

RE: Embedding a form into a panel control by ScottWylie

ScottWylie
Fri Apr 22 16:34:02 CDT 2005

The property 'AutoScroll = True' on the panel should do it for you.

"Cezar" wrote:

> I am embedding a form into a panel control using pnl.Controls.Add(form);
> This works pretty well, however there is one problem.
> The panel can resize, so there are cases when the panel size is smaller than
> the form embeded in it. The framework handles this problem by showing only a
> piece of the form that fits in the panel. Is there a way to add scroll bars
> to the panel so that the user can view the entire embedded form without
> resizing the panel?
> Is there any piece of code that handles this whole situation?
> Thank you
> Cezar Mart
>