• 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
Re: NSView and Cursor rects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSView and Cursor rects (From: "Bruce Johnson" <email@hidden>)

  • Prev by Date: Re: RS: NSString from RTF file
  • Next by Date: Open new document in first (empty) window
  • Previous by thread: NSView and Cursor rects
  • Next by thread: RE: NSView and Cursor rects
  • Index(es):
    • Date
    • Thread