Search code examples
c#heightrowtablelayoutpanel

TableLayoutPanel Last Row Size Too Big


My application uses a TableLayoutPanel that resides within a TabPage.

If the number of items I add is relatively small (i.e. it doesn't "fill up" the whole tab page) then the last row's height is stretched. Here is a screenshot of what's happening:

Table Layout Panel Last Row

I have tried to change the properties of the table to Autosize, GrowAndShrink, etc. but nothing seems to stop this from happening.

Here are my current settings for the layout properties of the table:

Table Layout Panel Layout Properties

How can I get the last row to be the same size as the other rows?

Thanks


Solution

  • Based on your design and your requirements I suggest you to make Dock property of TableLayoutPanel to top.