开发者

Resizable windows controls?

开发者 https://www.devze.com 2022-12-10 05:04 出处:网络
开发者_StackOverflowI am intersted whather I can make controls like treeview, RTF or tabcontrols resizable (I guess I can) and how. I know about using splitters but those only enable to make two areas

开发者_StackOverflowI am intersted whather I can make controls like treeview, RTF or tabcontrols resizable (I guess I can) and how. I know about using splitters but those only enable to make two areas to "overlap". Thank you!


You can set the control's Dock property to Fill. This will cause the control to fill it's parent container.

You may still need to write some code to handle laying out the child controls. You can either do this by handling the Resize event, or by using a container that supports resizing for you (such as FlowLayoutPanel or TableLayoutPanel).


The easiest way is to anchor the controls to the container they are in. Then, when the container is resized, the controls will be resized as well. Check out the Anchor property of the controls. You can set the control to anchor to the left, right, top, bottom of the container or any combination of those.

0

精彩评论

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

关注公众号