TableLayoutPanel.Controls Property


Gets the collection of controls contained within the TableLayoutPanel.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public TableLayoutControlCollection Controls { get; }

Property Value

Type: System.Windows.Forms.TableLayoutControlCollection

A TableLayoutControlCollection containing the controls associated with the current TableLayoutPanel.

The Controls property contains all of the controls associated with the table, including controls that may not be currently displayed because of GrowStyle, ColumnCount, or RowCount limitations.

The following code example enumerates all the child controls in the TableLayoutPanel.

  private void enumerateChildrenBtn_Click(
System.Object sender, 
System.EventArgs e)
      foreach ( Control c in this.TableLayoutPanel1.Controls )

.NET Framework
Available since 2.0
Return to top