473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

C# Tabbed Browser TabArray - On each tab browser navigates through array of string ad

1
When I want to add a new tab to the control I want a browser to be added to it.
Each tab/browser should have an array of string address's that the user can cycle through. Different tabs have different addresses to cycle through with left and right arrows.

I can do all this manually with one tab that uses an arraylist of addresses to navigate to but I cant do it with more than one. SO far i am able to add new tabs, and even add a browser to them but cannot navigate the browser to the address since I cannot access the browser name of the new tab. I also do not know how to assign an arraylist of string addresses dynamically. I have read in address from a text file I just dont know what to do with the arraylist.

I want to be able to make the browser of the currently selected tab navigate to the first address on the arraylist assigned to that tab. If you can point out how to do this, not even codewise but pesudo code would be helpful as I can not figure it out after spending a week trying different ways

Some snippets:

Expand|Select|Wrap|Line Numbers
  1.       tabControl1.SelectedTab
  2.  
  3.  
  4. Manual way of going forward and backwards on a tab:
  5.  
  6.         private void Next()
  7.         {
  8.             if (current < list.Count-1)
  9.             {
  10.                 current++;
  11.                 String x = (String)list[current];
  12.                 webBrowser1.Navigate(x);
  13.                 addressField.Text = x;
  14.  
  15.             }
  16.             else
  17.             {
  18.                 Console.WriteLine("AT THE END");
  19.             }
  20.             Enabler();
  21.         }
  22.  
  23.         private void Previous()
  24.         {
  25.             if (current > 0)
  26.             {
  27.  
  28.                 current--;
  29.                 String x = (String)list[current];
  30.                 webBrowser1.Navigate(x);
  31.                 addressField.Text = x;
  32.  
  33.             }
  34.             else
  35.             {
  36.                 Console.WriteLine("AT THE START");
  37.             }
  38.             Enabler();
  39.         }
  40.  
  41.  
  42.         private void Enabler()
  43.         {
  44.             String x = (String)list[current];
  45.  
  46.             if (current == list.Count - 1)
  47.             {
  48.                 toolStripButton2.Enabled = false;
  49.             }
  50.             else
  51.             {
  52.                 toolStripButton2.Enabled = true;
  53.             }
  54.  
  55.             if (current == 0)
  56.             {
  57.                 toolStripButton1.Enabled = false;
  58.             }
  59.             else
  60.             {
  61.                 toolStripButton1.Enabled = true;
  62.             }
  63.  
  64.             UpdateSeperator();
  65.         }
  66.  
  67.         private void UpdateSeperator()
  68.         {
  69.  
  70.             int g = list.Count;
  71.  
  72.             SeperateButtons.Text = (current+1) + "/" + g;
  73.  
  74.         }
  75.  
  76.  
  77.  
  78. Adding a tab:
  79.  
  80.       private void OpenTab()
  81.         {
  82.  
  83.             bookmarks.Add("http://www.beer.com");
  84.             bookmarks.Add("http://www.sky.com");
  85.             bookmarks.Add("http://www.taffatech.com");
  86.  
  87.  
  88.  
  89.             String title = "List " + (tabControl1.TabCount + 1).ToString();
  90.             TabPage addedTabPage = new TabPage(title); //create the new tab
  91.             tabControl1.TabPages.Add(addedTabPage); //add the tab to the TabControl
  92.             WebBrowser addedWebBrowser = new WebBrowser();
  93.             addedWebBrowser.Parent = addedTabPage; //add the new webBrowser to the new tab
  94.             addedWebBrowser.Dock = DockStyle.Fill;
  95.             String add =  (String) bookmarks[bookmarks.Count];
  96.             addedWebBrowser.Navigate(add);
  97.         }
Any advice would be nice, even if you do not know how to do it idea's would be great and I will try them!
Oct 18 '13 #1
0 1163

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: CJD | last post by:
Hello, I am new to .NET and am wondering if there is a way to put a Web Browser Control into a .NET Web Application. So basically I would end up with a browser in a browser. Is this possible and...
9
by: MSUTech | last post by:
Hello, What is the best way to check each character within a string? For doing something like encryption, where you check character 1 and replace it with a different character.. then check...
2
by: Techie Guy | last post by:
I'm trying to process a tab delimited file where each line in the file has around 12 tab delimited elements. My problem is the elements are surrounded by "quotes" and I need the script to remove...
16
by: petermichaux | last post by:
Hi, Does anyone have a a cross-browser setOpacity function that does not use browser sniffing? I looked at the Yahoo! UI function and it detects IE by looking for window.ActiveXObject. I also...
3
by: Rolf Welskes | last post by:
Hello, the following sample application in ASp.net 2.0 / VS2005 (Webproject). in an testPage.aspx ................ <P><A href="01Test01A.aspx">Link to 01Test01 A</A></P> <P><A...
1
by: spud379 | last post by:
i am doing an assignment in vb.net. i have to select at random from and array what i have is dim country(29) as string dim random as new random txtcountry.text = random.next(country) I...
4
by: Mokita | last post by:
Hello, I am working with Taverna to build a workflow. Taverna has a beanshell where I can program in java. I am having some problems in writing a script, where I want to eliminate the duplicates...
2
by: Kate77 | last post by:
Hello, Can anyone help me? I am trying to split a string in c# but i don't have a separator. for example split the string "hello" into array =h =e =l =l =o
3
by: moizpalitanawala | last post by:
Hello I want to do reverse each word of the String example if input String is "Hello World" then the output should be "olleH dlroW" i Have tried this far class g { static String s="Hello...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.