Pregunta

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?

¿Fue útil?

Solución

There is a method in NSTableView

- (void)scrollRowToVisible:(NSInteger)row;

That will scroll to the specified row.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top