Xojo Conferences

« Compressing PDFs with… | Home | MBS Xojo Developer Co… »

Tip of the day: Autohide scrollbar

If you put this code in a textarea's open event, you get a modern small auto hiding scroll bar:

dim n as NSScrollViewMBS = me.NSScrollViewMBS n.scrollerStyle = NSScrollerMBS.NSScrollerStyleOverlay n.verticalScroller.controlSize = NSScrollerMBS.NSSmallControlSize n.verticalScroller.knobStyle = NSScrollerMBS.NSScrollerKnobStyleDark n.scrollerKnobStyle = NSScrollerMBS.NSScrollerKnobStyleDark n.verticalScroller.scrollerStyle = NSScrollerMBS.NSScrollerStyleOverlay

As you see plugin provides for a lot of framework classes a function to quickly get the plugin counterpart. For Textarea, we provide quick access to NSTextViewMBS and NSScrollViewMBS objects. And on the scrollview the plugin provides all the accessors and constants to do this.
21 08 14 - 09:56
three comments

Heu. this code isn’t needed for auto hiding the scrollbar. It already does this by default.
It would be nice if you add a native scrollbar to the listbox with MBS
Peter - 21 08 14 - 17:50

Can this be method be used with other controls such as the Listbox or a Container?
Tim Jones - 21 08 14 - 18:11

Okay. So maybe we only make it smaller here effectively.
Christian Schmitz (URL) - 21 08 14 - 18:48

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.