0
votes

I would like to prevent a subclass of NSScrollView from flashing its scroller.

I tried to override -[NSScrollView flashScrollers] with empty implementation, but it does not work.

Any suggestion?

1

1 Answers

0
votes

If you hide the NSScrollView before setting the scroll position and show it again, it will prevent the scrollbars from flashing.

Here's a code sample:

[_scrollView setHidden:YES];
[[_scrollView contentView] scrollToPoint: NSMakePoint(0, scrollPosition)];
[_scrollView reflectScrolledClipView:[_scrollView contentView]];
[_scrollView setHidden:NO];