Add a Drop-down list (<select>) Handler to allow custom menu

Think CEF could benefit from a new feature or capability? Discuss CEF feature requests here.

Add a Drop-down list (<select>) Handler to allow custom menu

Postby valhentai » Fri Oct 14, 2016 4:12 am

I made a feature request to CefSharp but I have been redericted here because it need to be implemented at CEF level (https://github.com/cefsharp/CefSharp/issues/1834).

In our application, we need more control on how a drop down menu is displayed.
We are developping a touch application so we need to customise the drop list visual to make more touch friendly. Like what is done on Mobile OS where it is displayed using native UI element.

Like the DialogHandler and MenuHandler, we need an handler to provide our own implementation of the drop down list.
valhentai
Newbie
 
Posts: 4
Joined: Wed Apr 20, 2016 4:04 am

Re: Add a Drop-down list (<select>) Handler to allow custom

Postby magreenblatt » Fri Oct 14, 2016 9:15 am

Select menus are implemented in Chromium/Blink, so you would likely need to make changes in those projects. You can look at PopupMenuImpl in Blink code as a starting point: https://cs.chromium.org/chromium/src/th ... dr=CSs&l=5
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Add a Drop-down list (<select>) Handler to allow custom

Postby valhentai » Fri Oct 14, 2016 9:47 am

I don't need a implementation in Chromium. I just need an API which signal me a drop down list need to be displayed and give me the list of items to display. with this I can construct a UI using my application UI framework and later send back the info of which item has been selected.
Does such API already exist in Chromium?
valhentai
Newbie
 
Posts: 4
Joined: Wed Apr 20, 2016 4:04 am

Re: Add a Drop-down list (<select>) Handler to allow custom

Postby magreenblatt » Fri Oct 14, 2016 10:05 am

valhentai wrote:I don't need a implementation in Chromium. I just need an API which signal me a drop down list need to be displayed and give me the list of items to display. with this I can construct a UI using my application UI framework and later send back the info of which item has been selected.
Does such API already exist in Chromium?

You'll need to implement that functionality in Chromium/Blink, and then implement plumbing to expose that API via CEF/CefSharp.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Add a Drop-down list (<select>) Handler to allow custom

Postby Czarek » Fri Oct 14, 2016 1:48 pm

You can inject custom js on pages and overwrite native menus. Google "js custom select".
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Feature Request Forum

Who is online

Users browsing this forum: No registered users and 16 guests