How to limit clickable area in custom NSOutlineView cell?
How to limit clickable area in custom NSOutlineView cell?
- Subject: How to limit clickable area in custom NSOutlineView cell?
- From: Dave Camp <email@hidden>
- Date: Fri, 4 May 2007 08:01:01 -0600
I've got an NSOutlineView and I've made a subclass of NSCell to use
in one of the columns. The cell works as expected except for click
handling. The desired behavior is that if the user clicks in a
specific rectangle in the cell, I want the value to change (e.g. a
checkbox). If the user clicks anywhere else in the cell, I just want
the row to highlight.
The problem is that NSOutlineView calls my setObejctValue with a new
value no matter where I click in the cell. I've tried overriding both
the trackMouse:inRect:ofView:untilMouseUp: and startTrackingAt/
continueTracking/stopTracking methods to no avail. No matter what I
return I still get called to change my value no matter where the
click was.
What am I missing? I've reviewed the NSCell and NSTableView docs and
I don't see anything that would help me limit the target area other
than the mouse tracking methods. Is there a better way to handle this?
Thanks,
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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