• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to limit clickable area in custom NSOutlineView cell?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: WSMethodInvocationInvoke hangs
  • Next by Date: Adding an event handler to an NSView subclass using categories
  • Previous by thread: Re: Two simple questions regarding Core-Data
  • Next by thread: Adding an event handler to an NSView subclass using categories
  • Index(es):
    • Date
    • Thread