Re: Find Mouse Location Inside CustomView
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