• 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
Fwd: Where was the mouse clicked????
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Where was the mouse clicked????


  • Subject: Fwd: Where was the mouse clicked????
  • From: "Brian O'Brien" <email@hidden>
  • Date: Mon, 25 Apr 2005 10:45:37 -0600



Begin forwarded message:

From: Brian O'Brien <email@hidden>
Date: April 25, 2005 10:44:01 AM MDT
To: Stephane Sudre <email@hidden>
Subject: Re: Where was the mouse clicked????


On Apr 25, 2005, at 10:32 AM, Stephane Sudre wrote:

On 25 avr. 05, at 18:32, Brian O'Brien wrote:

I've read this document but cannot figure out what I need to know and cant' find any other document or
posting that explains this simple concept.
http://developer.apple.com/documentation/Cocoa/Conceptual/BasicEventHandling/index.html

I get a mouseDown event in my NSImageView subclass, but the coordinates that it is giving me
seem to have nothing to do with the location I clicked on within the image...
The image being displayed is 256x256 pixels.

- (void) mouseDown:(NSEvent *) theEvent
{
NSPoint mouseLoc=[self convertPoint:[theEvent locationInWindow] fromView:nil];

[...]
}



Ok so that works wonderfully...
One last problem...
The image has a frame around it that was draw as NSImageFrameGrayBezel
When I click on the frame is when I get the origin 0, 0 but really
I don't want the frame to be calculated as the origin. I want the
origin to be the bottom left corner of the image not the bottom
left corner of the frame... So is there some way of getting the
dimensions of the frame and translating?



 _______________________________________________
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: Fwd: Where was the mouse clicked????
  • Next by Date: Re: BUG?: Multiple Inheritance and DO
  • Previous by thread: Fwd: Where was the mouse clicked????
  • Next by thread: How do you call a method of a super view?
  • Index(es):
    • Date
    • Thread