Dzmitry
Dzmitry

Reputation: 749

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 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) ?

Upvotes: 1

Views: 1063

Answers (1)

PaulG
PaulG

Reputation: 14041

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

Upvotes: 4

Related Questions