« 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