Coldsteel48
Coldsteel48

Reputation: 3512

NSScrollView can't scroll

I am not that familiar with cocoa , I think I missing some simple method call or something. So my problem is: I have a subclass that drawing a plot , when I have to draw several plots I putting them inside NSScrollView's documentView. But here I have a problem When i want to scroll and mouse is on 1 of the plots, it just doesn't scroll , however if my mouse is near the plot (still on documentView) everything works fine .

I guess i have to add something inside my subclass so it will tell the NSScrollView to scroll , but I have no idea what. could some1 help me with that ?

Upvotes: 1

Views: 323

Answers (1)

Brian
Brian

Reputation: 15706

Since you are subclassing, the first thing I would check is that you're calling the super implementation in any overridden methods. Failing to do so is frequently the cause of lost behavior.

Also make sure your plot is not eating the scroll events before they propagate up to the scroll view.

Upvotes: 2

Related Questions