ruslan.berliner
ruslan.berliner

Reputation: 121

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

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

Upvotes: 1

Views: 1461

Answers (1)

pointum
pointum

Reputation: 3177

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.

Upvotes: 0

Related Questions