Setting cursor for subview of NSTextView
Setting cursor for subview of NSTextView
- Subject: Setting cursor for subview of NSTextView
- From: email@hidden (Stefan Haller)
- Date: Fri, 12 Mar 2010 22:11:02 +0100
I have a custom NSTextAttachmentCell that does its work by adding
subviews to the NSTextView (e.g. NSButtons). This works fine.
What I can't get to work is cursor handling; I always get an arrow
cursor when the mouse is over my views. I overwrite resetCursorRects,
like this:
- (void) resetCursorRects
{
[super resetCursorRects];
[self addCursorRect:[self bounds] cursor:[NSCursor pointingHandCursor]];
}
This doesn't help. Getting desperate, I tried implementing mouseMoved:,
but it's not even called (I made sure that my window has
setAcceptsMouseMovedEvents: set to YES).
Any ideas what else to try, or how to debug what's going on? Setting
breakpoints at [NSCursor set] or [NSCursor arrowCursor] didn't get me
very far yet.
Thanks,
Stefan
--
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/
_______________________________________________
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