I have a right hand panel area in my app that's a tall vertical custom view (let's call this the column view) that contains 2 tableviews. Each tableview does not scroll, and although they are embedded in the standard clipview and scrollview, the vertical height of the tableview is the same as the total number of rows it contains, and bounce is disabled. As the number of rows increases, the background column view increases in height and needs to scroll vertically. It's also embedded in a scrollview. This sounds more complicated than it is, here's a pic:
Scrolling of the background column view works fine as long as the mouse pointer is not inside the red boxes, i.e., over the tableviews. I want to be able to vertically scroll regardless of where the mouse is located within the column view. Any ideas?
Update: here's a mainstream example of where tableviews embedded in a scrollview work correctly, in Tweetbot (assuming those sections are tableviews)
If you want to have scroll view inside other one (red area). You need to disable inner scroll view scrollWheel
action. You can achieve that by writing custom NSScrollView
subclass, and adding following method :
- (void)scrollWheel:(NSEvent *)theEvent {
// If scroll is disabled, send action to next responder
if (self.scrollEnabled == NO) {
[self.nextResponder scrollWheel:theEvent];
}
else {
[super scrollWheel:theEvent];
}
}
But don't think you need to have scroll view inside other scroll view. Rather you could use one table view with 2 kinds of cells, one for 'section header' and other for 'cell'.
This way you have one table view with multiple sections - just like in iOS.