Find the rows and columns of a FlowLayoutPanel

2019-07-31 09:35发布

Just wondering if there is a way to easily lookup the rows and columns currently in a FlowLayoutPanel or if a manual calculation is required?

2条回答
小情绪 Triste *
2楼-- · 2019-07-31 10:20

Here is an example using linq to calculate the height:

var heightNeeded = flowLayoutPanel1.Controls.OfType<Control>()
    .Max(x => x.Location.Y + x.Height) + 7;
查看更多
放荡不羁爱自由
3楼-- · 2019-07-31 10:29

A manual calculation is required.

查看更多
登录 后发表回答