title: How can I group multiple controls together so that they are accessible by a method?
body: <p>I have multiple groups of controls on my form that changes together on a specific event ... but the changes are everytime the same and only the names of the controls are different.</p>
  
  <p>So I have to do:</p>
  
  <pre><code>label1.Text = "ready";
  label2.Text = "let's go";
  label1.ForeColor = System.Drawing.Color.Green;
  label2.ForeColor = System.Drawing.Color.LightGreen
  textbox1.Enabled = true;
  textbox2.Enabled = true;
  button1.Enabled = true;
  button2.Enabled = true;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>label1.Text = "not ready";
  label2.Text = "just waiting to get ready";
  label1.ForeColor = System.Drawing.Color.Red;
  label2.ForeColor = System.Drawing.Color.Orange;
  textbox1.Enabled = false;
  textbox2.Enabled = false;
  button1.Enabled = false;
  button2.Enabled = false;
  </code></pre>
  
  <p>in each of the events, but for label3+label4 or label5+label6 etc. instead.</p>
  
  <p>So my thought was, if it's possible to put the groups of controls in something like a container and then call a method with the container as parameter.</p>
  
  <p>like:</p>
  
  <pre><code>setReady(container);
  setNotReady(container);
  </code></pre>
  
  <p>and this method would then do all the stuff I want.</p>
  
  <p>So my question is, how would such a method look like resp. how can I access controls inside a container in this way? Or is there maybe a better way to handle something like this?</p>