[quote=198687:@Christoph De Vocht]Here is little project that includes native OSX scrollbars to a listbox with several declares. They are working natively so they are transparent, fade out, fade in, …
This is not transparent as it is elsewhere in OS X, would that be simply a browser showing this page. Your project, like Massimo’s, shows a grey scrollbar. Is is cute, but IMHO not conformant to OS X native scrollbar. In fact, it resembles very much Massimo’s project with the modifications I posted.
It is transparent when using OSX10.9 or higher. And it is a native scrollbar (check out the declares - no MBS plugins needed).
The scrollbar also widens up when clicking with when running OSX10.9 - OSX10.10 does not have this behaviour.
Changed the project so the transparency is clearly shown.
Here it is without MBS plugins. This version does lack the fade-in and fade-out feature. Maybe it is possible to add with some declare but here it is for now:
The code is still a bit messy but it does work fine. I use this in all my project that do use the listbox. No ugly non-native scrollbars for me. I still think Xojo Inc should add this by default.
I did a quick adaptation of my XDC NSScrollView example to control a Listbox instead of a container control.
It’s about as close to native look and feel as you’ll get with the Listbox. Keep in mind that the Listbox does all vertical scrolling by rows, not pixels, so there won’t be a smooth scroll up and down.