TableLayoutPanel.Controls Propiedad

Definición

Obtiene la colección de controles contenidos en el control TableLayoutPanel.

public:
 property System::Windows::Forms::TableLayoutControlCollection ^ Controls { System::Windows::Forms::TableLayoutControlCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.TableLayoutControlCollection Controls { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Controls : System.Windows.Forms.TableLayoutControlCollection
Public ReadOnly Property Controls As TableLayoutControlCollection

Valor de propiedad

Una colección TableLayoutControlCollection que contiene los controles asociados al objeto TableLayoutPanel actual.

Atributos

Ejemplos

En el ejemplo de código siguiente se enumeran todos los controles secundarios de TableLayoutPanel.

private void enumerateChildrenBtn_Click(
    System.Object sender, 
    System.EventArgs e)
{
    foreach ( Control c in this.TableLayoutPanel1.Controls )
    {
        Trace.WriteLine(c.ToString());
    }
}
Private Sub enumerateChildrenBtn_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles enumerateChildrenBtn.Click

    Dim c As Control
    For Each c In Me.TableLayoutPanel1.Controls

        Trace.WriteLine(c.ToString())

    Next

End Sub

Comentarios

La Controls propiedad contiene todos los controles asociados a la tabla, incluidos los controles que pueden no mostrarse actualmente debido a limitaciones de GrowStyle, ColumnCounto RowCount .

Se aplica a

Consulte también