Question

OK, this is my situation :

  • I have an NSMutableArray bound to an NSTableView, via an NSArrayController.
  • I'm manipulating the table view's selection (trigger by keyboard), using NSArrayController's selectNext: and selectPrevious:

The thing is : The selection does change, but the table view doesn't scroll to the current selection, so that its content is visible.

What should I do? Any ideas?

Was it helpful?

Solution

There is a method in NSTableView

- (void)scrollRowToVisible:(NSInteger)row;

That will scroll to the specified row.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top