• 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: Re: Using mouseEntered and mouseExited
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Using mouseEntered and mouseExited


  • Subject: Re: Re: Using mouseEntered and mouseExited
  • From: Bruce Beerbower <email@hidden>
  • Date: Mon, 22 Nov 2004 19:00:40 -0500


On Monday, November 22, 2004, at 01:29 PM, John C. Randolph wrote:


On Nov 20, 2004, at 7:28 AM, Bruce Beerbower wrote:



I have a program in which I want to change the cursor when the user points at a button. I assume that this can be accomplished by using mouseEntered and mouseExited in NSButtonCell. How do I go about this?


Isaiah,

This is the kind of thing that's typically done with a tracking rectangle. Have a look at the documentation for NSView's -addTrackingRect:owner:userData:assumeInside: and - removeTrackingRect: methods.

-jcr

jcr,
That's very nice. Are there some similar methods in NSButton or NSButtonCell, or will I have to make an NSView?


AgentM,
Subclass NSButton and implement those methods.
That won't work (I tried subclassing both NSButton and NSButtonCell)

Thanks,
	Isaiah






John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: NSArray operator implementing
  • Next by Date: Re: help on 'help books'
  • Previous by thread: Re: Using mouseEntered and mouseExited
  • Next by thread: All documents are responding
  • Index(es):
    • Date
    • Thread