Adding forms to flowlayoutpanel
I have an app tha开发者_开发问答t I need to be able to add child forms to a Main form. I can add the child forms to the main form at runtime easy enough, but when I resize the main form, the child forms do not resize accordingly.
I was wondering if adding the child forms to a flowlayoutpanel would help with resizing or should I just subscribe to the main forms "resize" event and resize the child forms accordingly.
You have to select a proper layoutPanel control from TablelayoutPanel, FlowlayoutPanel or SplitContainer as per your requirement. The description you have given is not enough to recommend a proper one for you.
Regardless of the layout panel, control resizing won't happen automatically. You have to set the Dock property to Fill, in order to resize your child controls controls. Again not sure what you mean by child controls? If they are UserControls they may work fine.
精彩评论