Page 1 of 1

Re: Find and zoom

Posted: Tue Feb 12, 2019 11:29 am
by salvadordf
Hi,

To catch those key presses you will need to use these events :
  • TChromium.OnPreKeyEvent
  • TChromium.OnKeyEvent
Read this for more information about those events :
https://magpcss.org/ceforum/apidocs3/pr ... entHandle)
https://magpcss.org/ceforum/apidocs3/pr ... dle,bool*)

Take a look at the MiniBrowser demo. It uses the F12 key to show the DevTools :
https://github.com/salvadordf/CEF4Delph ... r.pas#L725
https://github.com/salvadordf/CEF4Delph ... r.pas#L568

To use the ZOOM you need to call these procedures :
  • TChromium.IncZoomStep
  • TChromium.DecZoomStep
  • TChromium.ResetZoomStep
To search text in a web page and highlight the results you need to use these procedures :
  • TChromium.Find
  • TChromium.StopFinding
For more information about those procedures read this :
https://magpcss.org/ceforum/apidocs3/pr ... bool,bool)
https://magpcss.org/ceforum/apidocs3/pr ... ding(bool)

Re: Find and zoom

Posted: Mon May 11, 2020 6:04 pm
by danicarla2
Suggestion: Add this examples in minibrowser :D

Re: Find and zoom

Posted: Tue May 12, 2020 9:36 am
by salvadordf
Please download the latest CEF4Delphi version and open the MiniBrowser demo.

It already had the code showing how to use the key events and zoom functions but now it also has a "Find Text..." option in the menu.