views:

18

answers:

1

Hi, 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 control) 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) ?

+3  A: 

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

PaulG