Still unable to work out mouse position
Still unable to work out mouse position
- Subject: Still unable to work out mouse position
- From: "Christian Graus" <email@hidden>
- Date: Sat, 29 Nov 2008 15:38:53 +1030
Thanks to the person who answered yesterday, but I am no closer to a
solution. I have an NSTableView, and it contains NSTextAttachmentCell rows.
There's only one column in the table view. Basically, when a user clicks
on a row, I am getting the shouldSelectRow event, which gives me a row
index. I need to know if the user clicked on the icon which is in the first
16 pixels of the row. To do this, I want to either find out the mouse
position in general then normalise it to the control, or I want to capture
mouse movement ( without any clicks ) and record it as I go, so I know when
I click, what part of the cell was clicked on. I have found there's an
event on a cell that would tell me the mouse position on a click, but I
can't work out how to get the event, do I need to subclass NSTextAttachment
and NSTextAttachmentCell to make my cell a new type that also tracks the
mouse ? I get that impression from my reading, but surely I can just
subscribe to an event ? If I could just ask for the mouse position on
screen, and normalise it to my table view, that would solve all my issues.
Thanks
christian
_______________________________________________
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