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.

Disable right-click on touch screen

Post Reply
Hitman
Posts: 73
Joined: Sat May 20, 2017 11:08 am

Disable right-click on touch screen

Post by Hitman »

Hi guys,
i am trying to build a browser for touch screen purposes and i have ended up with the following,
as you all know, a right-click pop-up appears if you press the touch for few seconds while using the browser.

I am wondering,
is it possible to disable this completely?
if yes,
how?
is it called Context menu or what?

Many thanks in advance
User avatar
salvadordf
Posts: 4563
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Disable right-click on touch screen

Post by salvadordf »

Hi,

I added a couple of missing references at :
https://www.briskbard.com/index.php?lang=en&pageid=cef

There you can find all the links to CEF3 API Docs used by TChromium.

In your case, open the CefContextMenuHandler link and read the OnBeforeContextMenu event comments.
Hitman
Posts: 73
Joined: Sat May 20, 2017 11:08 am

Re: Disable right-click on touch screen

Post by Hitman »

Thanks Salvador!
I have checked and found this,
http://magpcss.org/ceforum/apidocs3/

What i want to do is to completely disable the right-click menu. I don't want any part of it.

Is this what you mean?
{procedure TfrmMain.chromiumMainBeforeContextMenu(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; const model: ICefMenuModel);
begin
Model.Clear;
end;}
User avatar
salvadordf
Posts: 4563
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Disable right-click on touch screen

Post by salvadordf »

Yes :)
Hitman
Posts: 73
Joined: Sat May 20, 2017 11:08 am

Re: Disable right-click on touch screen

Post by Hitman »

Indeed :)
Works like a charm! :D

Many thanks and many thanks for bringing this component alive again.

With best regards
Post Reply