AutoSize Behavior in the TableLayoutPanel Control
Distinct AutoSize Behaviors
The TableLayoutPanel control supports automatic sizing behavior in the following ways:
Through the AutoSize property;
The AutoSize Property with Row and Column Styles
|AutoSize setting||Style interaction|
||The TableLayoutPanel control proceeds from left to right, and allocates space for the column or row or in the following order.
1. If the SizeType property is set to Absolute, the number of pixels specified by Width or Height is allocated.
2. If the SizeType property is set to AutoSize, the number of pixels returned by the child control’s GetPreferredSize method is allocated.
3. After space for all Absolute and AutoSize columns or rows is allocated, any columns or rows with SizeType set to Percent are used to proportionally allocate the remaining free space
||Similar to the previous interaction, with the exception that Percent columns or rows acquire an automatic sizing aspect.
The TableLayoutPanel control expands the column or row to create adequate free space, so that no column or row with Percent styling clips its contents. The TableLayoutPanel control allocates the new space proportionally according to the Width or Height property.