• 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: Toolbar item with submenu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toolbar item with submenu


  • Subject: Re: Toolbar item with submenu
  • From: Nicko van Someren <email@hidden>
  • Date: Sun, 4 Jan 2004 16:25:07 +0000

On 4 Jan 2004, at 15:39, Philippe Robin wrote:

I am trying to mimic XCode's toolbar button that have a triangle in their bottom right corner and a menu attached to them, such as the build button, where a short click does the normal action and a longer click brings the menu.

It does not seam to be native cocoa... any pointer?

If you make a toolbar item using setView: rather than -setImage: then the view gets all the mouse clicks. At a guess you can then do what you want with them, including raising a menu using +popUpContextMenu:withEvent:forView:, or you can override -menuForEvent:

Nicko
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Toolbar item with submenu (From: Philippe Robin <email@hidden>)

  • Prev by Date: Re: Toolbar item with submenu
  • Next by Date: Re: NSPopUpButton trouble
  • Previous by thread: Re: Toolbar item with submenu
  • Next by thread: Re: Core Foundation analog to NSArchiver?
  • Index(es):
    • Date
    • Thread