3

I have a NSTableView that contains a NSButtonCell in one of the columns. To draw a custom background in neighbor cells (based on NSTextFieldCell) I use isHighlighted method:

- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
     if ([self isHighlighted]) {
     //here I draw the cell background

But for NSButtonCell isHighlighted shows only the button pressed state.

How to determine when the NSButtonCell is selected, i.e. when it's highlighted in the row?

andv
  • 23
  • 1
  • 6

0 Answers0