title: Tab system using panels
body: <p>I'm trying to make it to where a panel becomes visible and it sent to the front so it can be seen and interacted with, like this.</p>
  
  <pre><code>private void SettingsButton_Click(object sender, EventArgs e)
  {
      SettingsPanel.Visible = true;
      SettingsPanel.BringToFront();
  }
  </code></pre>
  
  <p>The problem is that after clicking a few of the buttons, it will either display the wrong panel or none at all. Is there a way to fix this?</p>
  
  <p>EDIT: Before y'all ask, i'm using WinForms.</p>