Recent CEF4Delphi updates in GitHub
Posted: Thu May 07, 2020 10:11 am
Hi,
The last updates to CEF4Delphi include some interesting new features :
Views Framework support : The Views framework allows to create some interface controls and browsers using CEF.
Those controls are not VCL or FMX but you can use them in your VCL or Firemonkey applications.
This might come handy if you just want a browser in a child window in your app as you can see in the new ToolBoxBrowser2 demo.
Multi-browser mode in TChromium : If the browser in your application allows CEF to create popup windows automatically like the MiniBrowser demo then you might find this feature useful.
This feature is disabled by default and TChromium will keep working as usual in your applications but MiniBrowser enables it because it allows automatic popup windows.
When you set the TChromium.MultiBrowserMode property to TRUE all the ICefBrowser references are stored inside TChromium and this allows you to use most of the procedures, functions and properties for any of the browsers, including the popup windows created automatically.
TChromium will work as usual by default and all the procedures, functions and properties will be applied to the main browser but if you call TChromium.SelectBrowser with a browser ID of one of the popup windows then you will be controlling that popup browser.
To get all the browser IDs you can use TChromium.BrowserCount and TChromium.BrowserIdByIndex.
TChromium.BrowserId will show the currently selected browser ID and TChromium.Browser is the selected ICefBrowser.
The last updates to CEF4Delphi include some interesting new features :
Views Framework support : The Views framework allows to create some interface controls and browsers using CEF.
Those controls are not VCL or FMX but you can use them in your VCL or Firemonkey applications.
This might come handy if you just want a browser in a child window in your app as you can see in the new ToolBoxBrowser2 demo.
Multi-browser mode in TChromium : If the browser in your application allows CEF to create popup windows automatically like the MiniBrowser demo then you might find this feature useful.
This feature is disabled by default and TChromium will keep working as usual in your applications but MiniBrowser enables it because it allows automatic popup windows.
When you set the TChromium.MultiBrowserMode property to TRUE all the ICefBrowser references are stored inside TChromium and this allows you to use most of the procedures, functions and properties for any of the browsers, including the popup windows created automatically.
TChromium will work as usual by default and all the procedures, functions and properties will be applied to the main browser but if you call TChromium.SelectBrowser with a browser ID of one of the popup windows then you will be controlling that popup browser.
To get all the browser IDs you can use TChromium.BrowserCount and TChromium.BrowserIdByIndex.
TChromium.BrowserId will show the currently selected browser ID and TChromium.Browser is the selected ICefBrowser.