Search code examples
objective-cswiftcocoansscrollviewnsscroller

Change the height of NSScroller in NSScrollView


I have a NSScrollView, which has NSClipView and vertical/horizontal NSScrollers in it.
Now I want to change the height of the vertical scroller so that it occupies only the top half portion of the scroll view. I can not change the height from the size inspector. I tried changing the frame. It didn't work either.
Can someone help me get through this problem? Thankyou in advance!


Solution

  • Since OS X 10.10, NSScrollView has a scrollerInsets property which should be able to position the scroller differently than the scroll view itself, if wanted.