I have a FlowLayoutPanel, and I am constantly adding controls to it. They all work, yeah, life is wonderful.
But when the container hits its boundaries, it just stays the same size. Now, I realize I can make it have scrollbars, but this is not what I desire. I want the FlowLayoutPanel to grow in size based on the controls added. Any ideas?
I have AutoSize mode set to true, by the way. This doesn’t seem to do anything.
I added a
FlowLayoutPanelto aForm. I added a button with the followingClickhandler:On the FLP, I set
FlowDirectiontoTopDownandAutoSizetotrue. I also set theBorderStyletoFixedSingleto see what’s happening.Now when you run this and click the button, it’ll add other buttons to the FLP. When you add too many, the form hides the overflowing-FLP.
I’m not sure if this is what you’re after, but if you want the
Formto increase in size as well, you setAutoSizetotrueon theFormtoo.If this isn’t what you’re looking for, please provide more details.