• 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: Detecting ctrl-click (context menu) in NSBrowser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting ctrl-click (context menu) in NSBrowser


  • Subject: Re: Detecting ctrl-click (context menu) in NSBrowser
  • From: Todd Yandell <email@hidden>
  • Date: Thu, 3 Feb 2005 23:07:52 -0600

Hi,

See NSCell's setMenu: message. You should be able to call this is your data source's browser:willDisplayCell: method. You would simply use the 'cell' variable passed to your data source's methods to set the correct menu. You might also find NSMenuItems's setRepresentedObject: message useful for this kind of thing, too. Personally, I've never tried this (as I've never needed a context menu on an NSCell subclass), but it should be pretty straightforward.

Hope that helps!
Todd Yandell
 _______________________________________________
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

References: 
 >Detecting ctrl-click (context menu) in NSBrowser (From: Mikael Arctaedius <email@hidden>)

  • Prev by Date: IBOutlet Problems
  • Next by Date: image in NSTextField, bug in docs
  • Previous by thread: Re: Detecting ctrl-click (context menu) in NSBrowser
  • Next by thread: NSComboBoxCell on a NSTableColumn getting and setting its value from/to the model through bindings
  • Index(es):
    • Date
    • Thread