1
votes

I intend to use NSOutlineView in NSScrollView that will not fit snugly to top and bottom edges because I need insert a shadow(overlapping gradient) on top and bottom scroll edges. Outline view should can be scrolled beneath the top shadow of the vertical and above bottom shadow. How that can achieved? Big thanks!

1

1 Answers

1
votes

I'm not quite sure how to get space for the top shadow, but the core of achieving it for the bottom shadow is to subclass NSOutlineView and override setFrameSize::

- (void)setFrameSize:(NSSize)newSize {
    newSize.height += kBottomShadowHeight;
    [super setFrameSize:newSize];
}

It's possible that you can play a similar trick with setFrameOrigin: to get some space at the top, but I'm less certain that will work.