Re: NSView and Cursor rects
Re: NSView and Cursor rects
- Subject: Re: NSView and Cursor rects
- From: "R. Matthew Emerson" <email@hidden>
- Date: Mon, 4 Jun 2007 19:53:59 -0400
On Jun 4, 2007, at 7:43 PM, Bruce Johnson wrote:
I working on signaling the mouseEntered and mouseExit events from a
subclassed NSView. The goal is to change the cursor when the mouse
moves
over my custom view.
In that case, you can just override -[NSView resetCursorRects] in
your NSView subclass.
Something like the following method ought to do it.
- (void)resetCursorRects
{
NSCursor *crosshair = [NSCursor crosshairCursor];
[self addCursorRect:[self visibleRect] cursor:crosshair];
[crosshair setOnMouseEntered:YES];
}
_______________________________________________
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