I'm searching for an elegant way to detect a right-click/ctrl-click on the header of an NSTableView.
When the right click occurs, I want to display an contextual menu.
- (NSMenu *)menuForEvent:(NSEvent *)
detects only right clicks in the table - not in the header of the table.
thanks for your help.
Get the NSTableHeaderView from the NSTableView and set it's menu.
[[myTableView headerView] setMenu:aMenu];