Page 1 of 1

Disable right-click on touch screen

Posted: Thu May 25, 2017 5:41 pm
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

Re: Disable right-click on touch screen

Posted: Fri May 26, 2017 7:10 am
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.

Re: Disable right-click on touch screen

Posted: Fri May 26, 2017 5:58 pm
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;}

Re: Disable right-click on touch screen

Posted: Fri May 26, 2017 9:02 pm
by salvadordf
Yes :)

Re: Disable right-click on touch screen

Posted: Mon May 29, 2017 6:04 pm
by Hitman
Indeed :)
Works like a charm! :D

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

With best regards