I have a TChromium broser from Delphi Chromium Embedded (http://code.google.com/p/delphichromiumembedded). I would like to attach a context menu to it. How I can achieve that?
I have a TChromium broser from Delphi Chromium Embedded (http://code.google.com/p/delphichromiumembedded). I would like to
Share
You need to handle the
OnBeforeMenuevent. In that event handler is enough to set the output parameterResulttoTruewhat will suppress the default context menus to popup. After that you can display your own menu on the positions obtained from themenuInfostructure.Here’s the code sample with a custom popup menu:
Update:
For dynamically created instance you have to assign the event handler manually. Try the following code.