Page 1 of 1

Custom popupmenu

PostPosted: Wed Sep 01, 2010 1:22 pm
by Bauglir
Hi,
I'd like to create own popup menu for CEF browser control, I'm able to prevent displaying default using HandleBeforeMenu method, I can display my own menu,
but how can I call "copy to clipboard" from that menu or access selection or link mouse is over?

Brona

Re: Custom popupmenu

PostPosted: Wed Sep 01, 2010 2:17 pm
by magreenblatt
The MenuInfo argument passed to HandleBeforeMenu gives you information about the current state including URLs, selection text, etc. The CefFrame object that can be retrieved by calling methods like CefBrowser::GetFocusedFrame expose methods for cut, copy, paste, etc.

Re: Custom popupmenu

PostPosted: Tue Apr 19, 2011 11:13 am
by intoinside
HandleBeforeMenu is not fired when the page stops context menu. Is there a way to get MenuInfo in any moment without waiting for HandleBeforeMenu?

Re: Custom popupmenu

PostPosted: Tue Apr 19, 2011 11:16 am
by magreenblatt
HandleBeforeMenu is not fired when the page stops context menu.

What do you mean by "page stops context menu"? Do you mean that context menu display is canceled using JavaScript in the page?

Re: Custom popupmenu

PostPosted: Wed Apr 20, 2011 2:21 am
by intoinside
magreenblatt wrote:What do you mean by "page stops context menu"? Do you mean that context menu display is canceled using JavaScript in the page?


Yes, exactly