<p>In our project, <a href="http://sharpwired.sourceforge.net/" rel="nofollow noreferrer">SharpWired</a>, we're trying to create a download component similar to the download windows in Firefox or Safari. That is, one single top down list of downloads which are custom controls containing progress bars, buttons and what not.</p>

<p>The requirements are that there should be one single list, with one element on each row. Each element must be a custom control. The whole list should be dynamically re-sizable, so that when you make it longer / shorter the list adds a scroll bar when needed and when you make it thinner / wider the custom controls should resize to the width of the list.</p>

<p>We've tried using a <code>FlowLayoutPanel</code> but haven't gotten resizing to work the way we want to. Preferably we should only have to set anchoring of the custom controls to Left &amp; Right. We've also thought about using a <code>TableLayoutPanel</code> but found adding rows dynamically to be a too big overhead so far.</p>

<p>This must be quite a common use case, and it seems a bit weird to me that the <code>FlowLayoutPanel</code> has no intuitive way of doing this. <em>Has anyone done something similar or have tips or tricks to get us under way?</em></p>

<p>Cheers!<br>
/Adam</p>

[{'answer_id': 27682, 'author': 'Matt Hamilton', 'author_id': 615, 'author_profile': 'https://Stackoverflow.com/users/615', 'pm_score': 1, 'selected': False, 'text': '<p>.NET 3.5 SP1 introduced a <a href="http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.powerpacks.datarepeater.aspx" rel="nofollow noreferrer">DataRepeater</a> Windows Forms control which sounds like it\'d do what you want. Bind it to the list of "downloads" (or whatever your list represents) and customize each item panel to include the controls you need. </p>\n'}, {'answer_id': 619685, 'author': 'SLaks', 'author_id': 34397, 'author_profile': 'https://Stackoverflow.com/users/34397', 'pm_score': 3, 'selected': True, 'text': "<p>If you don't want to use databinding (via the <code>DataRepeater</code> control, as mentioned above), you could use a regular <code>Panel</code> control and set its <code>AutoScroll</code> property to true (to enable scrollbars).</p>\n\n<p>Then, you could manually add your custom controls, and set the <code>Dock</code> property of each one to <code>Top</code>.</p>\n"}]
['https://Stackoverflow.com/questions/27674', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2457/']