open a website in tab number 2 from the MainForm (TabbedBrowser)

Post Reply
ericktux
Posts: 23
Joined: Thu Oct 29, 2020 10:11 am

open a website in tab number 2 from the MainForm (TabbedBrowser)

Post by ericktux »

Hello friends, as the title says, from the "MainForm" how can I go to tab number 2 of the "pagecontrol" and open any website. I'm using the "TabbedBrowser" demo in win10x64.
Please have some example to guide me
User avatar
salvadordf
Posts: 4087
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: open a website in tab number 2 from the MainForm (TabbedBrowser)

Post by salvadordf »

Hi,

Add a "Navigate" procedure to TBrowserFrame that calls WVBrowser1.Navigate.
Add a "Navigate" procedure to TBrowserTab that calss the TBrowserFrame.Navigate and then add this code in the main form :

Code: Select all

TBrowserTab(BrowserPageCtrl.Pages[1]).Navigate('http://www.example.com');
ericktux
Posts: 23
Joined: Thu Oct 29, 2020 10:11 am

Re: open a website in tab number 2 from the MainForm (TabbedBrowser)

Post by ericktux »

Thank you very much, I will do some tests and let you know.
Post Reply