TableLayoutPanel::ColumnStyles Property
Gets a collection of column styles for the TableLayoutPanel.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: [BrowsableAttribute(false)] property TableLayoutColumnStyleCollection^ ColumnStyles { TableLayoutColumnStyleCollection^ get(); }
Property Value
Type: System.Windows.Forms::TableLayoutColumnStyleCollection^A TableLayoutColumnStyleCollection containing a ColumnStyle for each column in the TableLayoutPanel control.
Use the ColumnStyles property to access the style properties of specific columns. You can use members of the ColumnStyle class to set the characteristics of individual columns in the table.
When the TableLayoutPanel control arranges its columns, it assigns priorities to each ColumnStyle in the following order:
Columns with ColumnStyle set to Absolute are considered first, and their fixed widths are allocated.
Columns with ColumnStyle set to AutoSize are sized to their contents.
Remaining space is divided among columns with ColumnStyle set to Percent.
The following code example sets the ColumnStyle properties of each column when a Button is clicked.
Available since 2.0