title: How to implement new tab in CefSharp with correct address and title change?
body: <p>I am using <code>CefSharp</code> to create a browser. It is working, I can navigate to various websites by using new tab. But when I click on previous tabs, all the tab shows same <code>URL</code> in the address bar and all of them has exactly same title. Here is  my code:</p>
  
  <pre><code>    private void FormBrowser_Load(object sender, EventArgs e)
      {
          CefSettings settings = new CefSettings();
          Cef.Initialize(settings);
          ChromiumWebBrowser browser = new ChromiumWebBrowser(toolStripTextBoxAddress.Text);
          browser.Parent = tabControl.SelectedTab;
          browser.Dock = DockStyle.Fill;
          browser.AddressChanged += Browser_AddressChanged;
          browser.TitleChanged += Browser_TitleChanged;
      }
  
      // new tab function
      public void addNewTab()
      {
          TabPage tpage = new TabPage();
          tpage.Text = "New Tab";
          tabControl.Controls.Add(tpage);
          tabControl.SelectTab(tabControl.TabCount - 1);
          toolStripTextBoxAddress.Text = "";
          ChromiumWebBrowser browser = new ChromiumWebBrowser(toolStripTextBoxAddress.Text);
          browser.Parent = tpage;
          browser.Dock = DockStyle.Fill;
          browser.AddressChanged += Browser_AddressChanged;
          browser.TitleChanged += Browser_TitleChanged;
      }
  
      private void Browser_TitleChanged(object sender, TitleChangedEventArgs e)
      {
          this.Invoke(new MethodInvoker(() =&gt;
          {
              tabControl.SelectedTab.Text = e.Title;
          }));
      }
  
      private void Browser_AddressChanged(object sender, AddressChangedEventArgs e)
      {
          this.Invoke(new MethodInvoker(() =&gt;
          {
              toolStripTextBoxAddress.Text = e.Address;
          }));
      }
  
      // navigate method
      private void toolStripTextBoxAddress_KeyUp(object sender, KeyEventArgs e)
      {
          if (e.KeyCode == Keys.Enter)
          {
              if (!string.IsNullOrEmpty(toolStripTextBoxAddress.Text))
              {
                  if (!toolStripTextBoxAddress.Text.Contains("."))
                  {
                      getCurrentBrowser().Load("http://www.google.com/search?q=" + toolStripTextBoxAddress.Text);
                  }
                  else
                  {
                      getCurrentBrowser().Load(toolStripTextBoxAddress.Text);
                  }
              }
          }
      }
  
     // get current browser
      private ChromiumWebBrowser getCurrentBrowser()
      {
          return (ChromiumWebBrowser)tabControl.SelectedTab.Controls[0];
      }
  
      // new tab button
      private void toolStripButtonNewTab_Click(object sender, EventArgs e)
      {
          addNewTab();
      }
  </code></pre>
  
  <p>Here is what I have tried:</p>
  
  <pre><code>    private void tabControl_SelectedIndexChanged(object sender, EventArgs e)
      {
          ChromiumWebBrowser currentBrowser = getCurrentBrowser();
          toolStripTextBoxAddress.Text = currentBrowser.Address;
      }
  </code></pre>
  
  <p>When i try to open a new tab it is giving me an error in this line <code>return (ChromiumWebBrowser)tabControl.SelectedTab.Controls[0];</code></p>
  
  <p>How can I solve this problem? Thanks in advance.</p>