Post by Makan on May 14, 2014 22:14:32 GMT 10
Well last time I was using the normal tab control that comes preinstalled with VB.NET and was working with tabs like this:
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Tab")
TabControl1.SelectTab(int)
Browser.Name = "Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
AddHandler Browser.DocumentCompleted, AddressOf Done
AddHandler Browser.ProgressChanged, AddressOf Loading
Browser.ScriptErrorsSuppressed = True '<< Add this to stop getting Script Errors in browser
Browser.GoHome()
StartMenuPanel.Hide()
But now that I got the awesomium and use the super tab control I get an error:
Dim newTab As TabItem = SuperTabControl1.CreateTab("New Tab")
Gives me an error at createtab(...) do you know how to make it so that when ever I press the add button a new tab will show? (With the awesomium web browser in it?)
|
|
Post by Nathan Lecompte on May 16, 2014 18:50:51 GMT 10
Hey Makan, The SuperTabControl has the same method like the regular tab-control although it's just rephrased.
Use this:
Dim Browser As New WebBrowser
TabControl1.CreateTab("New Tab523134613")
do until SuperTabControl1.selectedtab.text = "New Tab523134613" SuperTabControl1.Selectnexttab() loop
Browser.Name = "Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
AddHandler Browser.DocumentCompleted, AddressOf Done
AddHandler Browser.ProgressChanged, AddressOf Loading
Browser.ScriptErrorsSuppressed = True '<< Add this to stop getting Script Errors in browser
Browser.GoHome()
StartMenuPanel.Hide()
Or Remove "Dim newTab As TabItem = " and just use "SuperTabControl1.CreateTab("New Tab")"
Hope this helps!
Nathan.
|
|
Post by Nathan Lecompte on May 19, 2014 22:32:39 GMT 10
Do you know how to do it so that when the newtab is made the awesomuim web browser would show? Not the normal one? This is an entirely new question and will be moved to a new thread...if the current question has been answered please add "[SOLVED]" to your subject/title. Hope this helps!
|
|