Einzelnen Beitrag anzeigen

MathiasSimmack
(Gast)

n/a Beiträge
 
#13

Re: Auf Control zugraufen per Schleife?

  Alt 2. Jul 2005, 09:40
Delphi-Referenz durchsuchenControls ist doch ein Arraytyp. Klappt ja selbst mit CSharp wunderbar:
Code:
private void SetChildrenVisibility(Control parent, bool visible)
{
  foreach(Control control in parent.Controls) {
    control.Visible = visible;
  }
}

this.SetChildrenVisibility(this, false);
  Mit Zitat antworten Zitat