Question

I have a flowlayoutpanel, on which there are some UserControls, which are being dragged and dropped in flowlayoutpanel. I need my controls - userCOntrols to auto resize when resizing the window itself. I need that Usercontrols to be resized automatically when resizing the form. What can you offer ?

Was it helpful?

Solution

You should use the Dock Property for that.

How to dock a control:

  1. Select the control that you want to dock.
  2. In the Properties window, click the arrow to the right of the Dock property. An editor is displayed that shows a series of boxes representing the edges and the center of the form.
  3. Click the button that represents the edge of the form where you want to dock the control. To fill the contents of the control's form or container control, click the center box. Click (none) to disable docking.

The control is automatically resized to fit the boundaries of the docked edge.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top