Josh Dycus

Josh Dycus

  • NA
  • 11
  • 20.4k

treeview and tabcontrol with multiple tabs

Sep 3 2010 10:23 AM
Hello,

I am new to the forum and fairly new to C#.  I am building a program that has a splitcontainer.  One side has a treeview and the other side has a Tab control .  When the treenodes are selected it draws 3 tabs and a web control on every tab.  Each tab has it's own URL that it navigates to.  What i am trying to do is only navigate to the first tab when the node is clicked and not navigate to the other URL's until the tabs are clicked on.  Here is a the code for one of the nodes:
switch (e.Node.Text)
            {
                case "GX620":
                #region GX620 Tab Controls
                tabControl1.TabPages.Add(TP);
                tabControl1.TabPages.Add(TP1);
                tabControl1.TabPages.Add(TP2);
                TP.Text = ("Drivers");
                TP1.Text = ("Service Manuals");
                TP2.Text = ("System Specs");
                WB.Dock = DockStyle.Fill;
                WB1.Dock = DockStyle.Fill;
                WB2.Dock = DockStyle.Fill;
                this.TP.Controls.Add(WB);
                this.TP1.Controls.Add(WB1);
                this.TP2.Controls.Add(WB2);
                #endregion
                WB.Navigate(URL);
                WB1.Navigate(URL);
                WB2.Navigate(URL);
            break;

Where URL is there is actually a web address not just URL.  Any help would be appreciated.

Thanks

Answers (1)