Windows Forms Autosizing in .NET

Posted by mcoolbeth on Stack Overflow See other posts from Stack Overflow or by mcoolbeth
Published on 2010-04-23T21:16:54Z Indexed on 2010/04/23 21:23 UTC
Read the original article Hit count: 471

My C# project contains a form. There are some controls across the top of the form and some controls across the bottom of the form, as well as a FlowLayoutPanel in the center, all of which have been placed with the Visual Studio Form Designer.

During runtime, controls are dynamically added to and removed from the FlowLayoutPanel, and both the panel and the form itself are configured to automatically fit the size of they're contents.

However, since some controls were placed with the designer above and below the FlowLayoutPanel, the desired resizing fails to take place when new controls are added to the FlowLayoutPanel.

Does anybody know of a convenient remedy for this problem?

© Stack Overflow or respective owner

Related posts about windows-forms-designer

Related posts about windows-forms