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: Mikael Arctaedius <email@hidden>
- Date: Thu, 3 Feb 2005 22:19:39 +0100
Nope, it doesn't work when I connect the NSBrowser's menu outlet to the
menu. It works for a NSTableView that I have in the same window and it
works for the window's NSView, but when connected to the NSBrowser no
context menu is displayed when ctrl-clicking in the browser area...
I have also tried the setMenu method invoked on the browser object.
Is it a bug?
Mikael Arctaedius
2005-02-03 kl. 20.54 skrev Nick Zitzmann:
On Feb 3, 2005, at 12:11 PM, Mikael Arctaedius wrote:
I have a NSBrowser which displays a directory structure and when
ctrl-clicking an element, folder or file, I want to support a context
menu for that specific folder/file. But how to I get notified about
ctrl-clicks in a NSBrowser? I haven't found a method for it in the
delegate methods for NSBrowser. Do I need create an own subclass to
NSBrowser and try to "catch" the mouseclicks?
You shouldn't need to do that; just set the browser's menu using the
-setMenu: method or by connecting the browser to the menu in IB. If
you need to dynamically set up the menu, and you're targeting Panther
or later, then you can use the NSMenu delegate methods.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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