开发者

Adding forms to flowlayoutpanel

开发者 https://www.devze.com 2023-03-23 06:03 出处:网络
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 form

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号