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.

TPopupMenu.popup doesnt work with CEF4Delphi

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

Re: TPopupMenu.popup doesnt work with CEF4Delphi

Post by salvadordf »

Hi,

Set a breakpoint inside the TWebBrowserFrame.ChromiumProcessMessageReceived procedure to check that the process message is received.

If you receive the message and the TPopupMenu doesn't show then try using the context menu provided by CEF.

You can customize that context menu as you like. Read this post for more details :
https://www.briskbard.com/forum/viewtop ... 1002#p4417

To show the CEF context menu you will need to call TChromium.SendMouseClickEvent.

The TChromium.SendMouseClickEvent parameters can be obtained by running the SimpleOSRBrowser demo and logging the values in these procedures when you click the right mouse button over the browser :
  • TForm1.Panel1MouseDown
  • TForm1.Panel1MouseUp
User avatar
salvadordf
Posts: 4042
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: TPopupMenu.popup doesnt work with CEF4Delphi

Post by salvadordf »

The MiniBrowser demo uses a customized context menu you can use :
https://github.com/salvadordf/CEF4Delph ... r.pas#L374

Read this post for more details :
https://www.briskbard.com/forum/viewtop ... 1002#p4417
Post Reply