• 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
Find Mouse Location Inside CustomView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Find Mouse Location Inside CustomView


  • Subject: Find Mouse Location Inside CustomView
  • From: Daniel J Farrell <email@hidden>
  • Date: Wed, 28 Jun 2006 20:52:00 +0100

Hi folks,

Is there a NSView method that will tell me the current coordinates (NSPoint) of the mouse pointer relative to the NSView (in this case it is actually a CustomView) coordinate system.

I have found NSEvent('s) -mouseLocation but this gives at NSPoint relatively to the screen and NSWindow('s) - mouseLocationOutsideOfEventStream and this gives an NSPoint relative to the Window. I guess it must be possible to transform from any or all of the different coordinate systems but just wanted to see if there is an easy Cocoa way to do find this information.

Regards,

Daniel
_______________________________________________
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


  • Follow-Ups:
    • Re: Find Mouse Location Inside CustomView
      • From: Greg Titus <email@hidden>
  • Prev by Date: Re: Implementing a TCP port listener in Cocoa
  • Next by Date: Re: Find Mouse Location Inside CustomView
  • Previous by thread: Re: Re: Is there another way to do performSelectorOnMainThread?
  • Next by thread: Re: Find Mouse Location Inside CustomView
  • Index(es):
    • Date
    • Thread