
Dynamic Control Creation - Expand Form?
Quote:
> When you dynamically create controls (e.g. a series of text boxes) on
> a form, is there a way to make the form expand to contain all of the
> controls? Or will the form automatically put vertical/horizontal
> scroll bars in place to view the controls off the page?
No.
The way I ususally do is, instead of putting them directly on a form,
put all the controls inside a panel(InsidePanel) inside another panel
(OuterPanel). Adjust the InsidePanel.width and InsidePanel.length to
accomodate all the controls whenever you add a new control. The
OuterPanel should fit the length and width of the form (so customize
OuterPanel.Width and OuterPanel.Length in the form_resize event). Put a
scroll bar (or two) on the form. Use the value of the scroll bars to
control the top and left position of the InsidePanel, essentially
moving it inside the OuterPanel.
Quote:
>I am just beginning a
> project which requires dynamic generation, and want to do it right the
> first time.
Thats not good for job security.
Quote:
>I am using VB5.0 with Window98and Access97.
> Thanks in advance..........
> --
> Tim Pascoe
> GIS and Environmental Applications Specialist
> National Water Research Institute
> Canada Center for Inland Waters
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
-Amos Yung
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.