I want to create custom scroll bars for GWT project. I want to replace entire scroll bar style from browser to custom one.
1 Answers
Replacing the native scrollbar in general, meaning everywhere a native scrollbar appears, this must be replaced by the custom one can be answered by this Changing the scrollbars' style As you can see it's browser specific and a generic way cannot be achieved. It doesn't matter if you are using GWT or plain Javascript or some Javascript library.
What you can do is include the parts of your application that you expect to show a native scrollbar inside a panel that will replace it (hide it) and show the custom one. Of course you will have to add some handlers. You can check this http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/CustomScrollPanel.html that does exactly that. Of course this widget already has a certain styling, but this can be replaced with your theme.
If you want to do it in a generic way, depending on the complexity of your application's UI, you are in a lot of trouble. Moreover check this too https://softwareengineering.stackexchange.com/questions/101523/custom-vs-browser-native-scrollbars

- 1
- 1

- 17,044
- 15
- 59
- 113