title: Accessing a RichTextBox inside a TabControl
body: <p>I create a new tab with this:</p>
  
  <pre><code>private void addTabs(RichTextBox richTextBox,string name)
      {
          //Add Tabs
          try
          {
              if (tabControl1.TabPages.Count &lt;= 8)
              {
                  TabPage tabPage = new TabPage();
                  tabPage.Controls.Add(richTextBox);
                  if (name == null)
                  {
                      tabPage.Text = "Page: " + (tabControl1.TabCount + 1).ToString();
                      tabPage.Tag = "Page: " + (tabControl1.TabCount + 1).ToString();
                  }
                  else
                  {
                      tabPage.Text = name;
                      tabPage.Tag = name;
                  }
                  richTextBox.Dock = DockStyle.Fill;
  
                  tabControl1.TabPages.Add(tabPage);
              }
              else
                  MessageBox.Show("You have reached the max threshold for tabs.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
          }
          catch (Exception e)
          {
              MessageBox.Show(e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
              Console.WriteLine(e.Message);
          }
      }
  </code></pre>
  
  <p>This create a new tab and gives it a richtextbox.
  I know how to save a file using the dialog but how do I access the richtextbox?</p>