title: How can I give focus to a textBox after a Tab has been selected?
body: <p>I'd like give focus to a textBox after a Tab has been selected but no matter what I try it doesn't work. I've looked at similar questions here but they don't get me the results I need. Here is what Ive tried.</p>
  
  <pre><code>    private void tabBDERip_Click(object sender, EventArgs e)
      {
          textBoxPassword.Focus();
      }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>    private void tabAll_SelectedIndexChanged(object sender, EventArgs e)
      {
          if (tabAll.SelectedTab == tabBDERip)
          {
              textBoxPassword.Focus();
          }
      }
  </code></pre>
  
  <p>Can someone please tell me what I'm doing wrong?</p>
  
  <p>Thanks</p>