Re: Detecting ctrl-click (context menu) in NSBrowser
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