开发者

Resize WinForms UserControl

folks, I've developed user control on WinForms, that consists of 2 textBoxes and 1 button between.When i add this control to the form and try to resize it(in general i need to resize only width), textboxes and button are not resized and staied on their place, but resized only form(User c开发者_JAVA技巧ontrol) on which this controls are placed. How can i get this controls resized proportional to the form size(form on which these controls are placed) ?


The controls have a Anchor property which determines how they resize. If you anchor the controls to the top, left, right and bottom, then as you resize the form it will resize the controls

If you want to only resize the width, then dock to top, left and right.

Play about with it and it will soon make sense

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜