Re: Getting mouse events in view placed in NSTableRowView
Re: Getting mouse events in view placed in NSTableRowView
- Subject: Re: Getting mouse events in view placed in NSTableRowView
- From: Kyle Sluder <email@hidden>
- Date: Fri, 23 Nov 2012 18:03:32 -0800
On Nov 23, 2012, at 4:26 PM, email@hidden wrote:
>
> I tried hit test in a point that should be in my custom view, and it returned the NSTableView. I don't understand why the event seems to pass through my custom view and the NSTableRowView.
NSTableView overrides -hitTest: to implement row selection and dragging. So it's not "passing through;" it's being preempted.
Consider subclassing NSTableView and overriding -hitTest: to call -hitTest: on your slider and return it if it returns itself, or return super's value otherwise.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden