• 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: Responding to Click in an NSImageView? (Newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Responding to Click in an NSImageView? (Newbie)


  • Subject: Re: Responding to Click in an NSImageView? (Newbie)
  • From: David Remahl <email@hidden>
  • Date: Sat, 13 Apr 2002 18:55:49 +0200

> Hi,
> It seems NSImageView only sends the action message to my target
> when I drag and drop an image in to it. How can I get it to respond to
> a simple click (like a button for instance).
> FWIW, Im trying to respond to the user clicking in different parts of an
> image.
>
> Thanks for any clues.
>
> Steve

You will need to override mouseDown:...:

- (void)mouseDown:(NSEvent *)theEvent
{
[NSApp sendAction:[self action] to:[self target] from:self];
}

/ David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Responding to Click in an NSImageView? (Newbie) (From: Steve <email@hidden>)

  • Prev by Date: Re: mixing c with obj c
  • Next by Date: Calling IB Actions In PB
  • Previous by thread: Responding to Click in an NSImageView? (Newbie)
  • Next by thread: Printing Problems
  • Index(es):
    • Date
    • Thread