user1408095
user1408095

Reputation: 23

C# Windows Form FlowLayoutPanel with AutoSize and a max amount of horizontal space to be used before stacking vertically?

I am creating a windows form in Visual Studio 2012, it has a docked and anchored FlowLayoutPanel in the centre that has Autoscroll on. I've got some groupboxes in it that I want to be arranged horizontally with any that go to the right / off the visible area of panel being arranged on the next row. This is so that if a user has the app full screen all group boxes are visible, but they can also resize it so that it's only a couple hundred pixels wide and the group boxes will all arange in a column or two. I don't mind if the panel scrolls vertically, but I don't wan't it to horizontally.

How can I do this?

Thanks!

Upvotes: 0

Views: 469

Answers (1)

Jonathon Lee
Jonathon Lee

Reputation: 211

It could be that FLowLayoutPanel.WrapsContent has been set to False. Check that property and ensure it is set to True.

Upvotes: 1

Related Questions