• 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: Make an NSButton send a message on right click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make an NSButton send a message on right click


  • Subject: Re: Make an NSButton send a message on right click
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 23 Oct 2009 10:55:57 -0700


On Oct 22, 2009, at 5:28 PM, Alexander Golec wrote:

For the cells, I want to have a matrix of NSButtons, and I want each button to respond differently to right clicks and left clicks. Would I have to extend NSButton or something?

Yup. Subclass NSButton, override -mouseDown: and check whether the event uses the right button. If so, do your thing; otherwise, call the superclass method.


—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Make an NSButton send a message on right click
      • From: Kyle Sluder <email@hidden>
References: 
 >Make an NSButton send a message on right click (From: Alexander Golec <email@hidden>)

  • Prev by Date: Re: stringWithContentsOfURL with resulting error 256
  • Next by Date: Re: Make an NSButton send a message on right click
  • Previous by thread: Make an NSButton send a message on right click
  • Next by thread: Re: Make an NSButton send a message on right click
  • Index(es):
    • Date
    • Thread