Changing the style of a scrollbar

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Changing the style of a scrollbar

Postby arvelius » Thu Dec 04, 2014 3:11 am

Hello,

I've a question regarding the custom scrollbar styles. I know how to do it using the Css and it works fine if I create a page with the style embedded.
The problem is, how to set the scrollbar style for any page - there used to be an option to specify user_style_sheet_enabled and user_style_sheet_location, but this is not possible anymore and the only way I know about is to modify the html using JavaScript after the page is loaded. And now comes the problem - the scrollbars are not updated, I have to resize the window a few times to make the scrollbars disappear and reappear again and after that it is fine.

Any help about that?
arvelius
Techie
 
Posts: 46
Joined: Wed Sep 17, 2014 8:37 am

Re: Changing the style of a scrollbar

Postby magreenblatt » Thu Dec 04, 2014 4:22 am

magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Changing the style of a scrollbar

Postby arvelius » Thu Dec 04, 2014 6:59 am

Thanks for the reply, I've read the text dozens of times, but still cannot figure out how could I inject the custom styles if there is no DOM in OnLoadStart...
arvelius
Techie
 
Posts: 46
Joined: Wed Sep 17, 2014 8:37 am

Re: Changing the style of a scrollbar

Postby magreenblatt » Thu Dec 04, 2014 8:42 am

arvelius wrote:Thanks for the reply, I've read the text dozens of times, but still cannot figure out how could I inject the custom styles if there is no DOM in OnLoadStart...

Yes, that's the problem. There's no resolution at the moment.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Changing the style of a scrollbar

Postby Czarek » Thu Dec 04, 2014 8:56 am

The injected javascript code could use setTimeout/setInterval to check periodically whether document.head.innerHTML is defined.
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 Support Forum

Who is online

Users browsing this forum: Google [Bot] and 104 guests