Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Find and zoom

Post Reply
User avatar
salvadordf
Posts: 4573
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Find and zoom

Post 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)
User avatar
danicarla2
Posts: 19
Joined: Mon Oct 01, 2018 6:01 pm
Location: Brazil

Re: Find and zoom

Post by danicarla2 »

Suggestion: Add this examples in minibrowser :D
User avatar
salvadordf
Posts: 4573
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Find and zoom

Post 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.
Post Reply