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

Re: Find Mouse Location Inside CustomView


  • Subject: Re: Find Mouse Location Inside CustomView
  • From: Greg Titus <email@hidden>
  • Date: Wed, 28 Jun 2006 12:55:56 -0700

See -convertPoint:fromView:. Pass "nil" as the view to convert from to convert from window coordinates to the view's coordinates.

Hope this helps,
	- Greg

On Jun 28, 2006, at 12:52 PM, Daniel J Farrell wrote:

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

_______________________________________________ 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: Daniel J Farrell <email@hidden>
References: 
 >Find Mouse Location Inside CustomView (From: Daniel J Farrell <email@hidden>)

  • Prev by Date: Find Mouse Location Inside CustomView
  • Next by Date: Re: Binding beginner question
  • Previous by thread: Find Mouse Location Inside CustomView
  • Next by thread: Re: Find Mouse Location Inside CustomView
  • Index(es):
    • Date
    • Thread