0

I tried to highlight the rows in a NSBrowser using selectRowIndexes of the NSBrowser,but it does not highlight the rows.In 'NSTableView`rows can be highlighted using

 - [NSTableView selectRowIndexes:byExendingSelection:]

  - (void)selectRowIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger).

Is there any api to highlight the rows in NSBrowser? I would like to highlight the rows without a mouseclick on the browser,I have some known indexes I want to highlight these rows in my custom method.

Ram
  • 1,872
  • 5
  • 31
  • 54

1 Answers1

1

To select the first five rows in the first column :

NSIndexSet *indexes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0,4)];
[myNSBrowser selectRowIndexes:indexes inColumn:0];

To select the fourth row in the first column :

[myNSBrowser selectRow:3 inColumn:0];
jackjr300
  • 7,111
  • 2
  • 15
  • 25
  • 1
    I dont see this as an answer. I'm having the same issue, an event happens i select the proper row/column, but there is no highlight, so the user feel as if i did not update selection .... – Klajd Deda Apr 06 '16 at 07:51