I've noticed that regularly, wxWidgets users are looking for a way to change their scrollbar style.
Last year I started something about this, then the time passed, I forgot this piece of code until recently
where I came across one of these articles. So I decided to share what I did in the case it could help (see example below).

It's not a miracle solution, it's not production-ready code, I even do not claim it's a good solution.
But it may help people as a base to do something better.
It is based on the wxScrolled<wxWindow>::SetTargetWindow that is able to redirect scrolling to a given window.
The code is reasonably commented so I guess it can be handled and modified without too much difficulties.
I have tested it under Windows only, using wxWidgets 3.1.
You will find a zip archive of it here http://www.gipsa-lab.grenoble-inp.fr/~p ... dow_v2.zip that includes:
- 1 file for the toy program
- 2 files (cpp and .h) for the scrolled window class
- 2 files (cpp and .h) for the scrollbar class
my_scrolled_window.h explains with a small graphic the way the panels are embedded in each other.
In the main file, a #define among 5 allows to see the scrolled window in different contexts :
- to scroll a panel
- to scroll a toolbar (in this case, horizontal or vertical scroll can be disabled)
- to scroll a dialog
One can tune:
- the scroll direction (horizontal, vertical or both)
- the thumb color, the margin color and the tip color (not sure it's the right terms)
- the size of these items
All the events are not managed but the thumbs work well with the mouse. it still needs some work....
I hope you will enjoy it.
By the way, thanks to the wxWidgets team for such a great tool and thank you to the forum team for their valuable support all year long.
Kind regard,
Pascal