How to catch click event on NSImageView as subview in NSTableRowView?

1.4k views Asked by At

In NSTableView I have NSTableRowView and in this row there is some NSImageView subview. Question: how to track click event on this image?

1

There are 1 answers

0
pointum On

You would need to create NSImageView subclass to handle mouse events. But NSTableView does not allow handling -[NSImageView mouseUp:] and other mouse messages. (I think this is related to how a table handles selection).

In this situation I had to use a borderless "Bevel - Switch" button to handle clicks.