• 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: 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
  • Follow-Ups:
    • Re: Detecting ctrl-click (context menu) in NSBrowser
      • From: Nick Zitzmann <email@hidden>
References: 
 >Detecting ctrl-click (context menu) in NSBrowser (From: Mikael Arctaedius <email@hidden>)
 >Re: Detecting ctrl-click (context menu) in NSBrowser (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: NSView and NSMenuItem not updating displays
  • Next by Date: Re: Detecting ctrl-click (context menu) in NSBrowser
  • Previous by thread: Re: Detecting ctrl-click (context menu) in NSBrowser
  • Next by thread: Re: Detecting ctrl-click (context menu) in NSBrowser
  • Index(es):
    • Date
    • Thread