• 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: How to create a simple pop-up-menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create a simple pop-up-menu


  • Subject: Re: How to create a simple pop-up-menu
  • From: Preston Jackson <email@hidden>
  • Date: Tue, 3 Mar 2009 09:03:12 -0700

Alternatively, you can create an NSMenu and use the class method

+ (void)popUpContextMenu:(NSMenu *)menu withEvent:(NSEvent *)event forView:(NSView *)view

to pop it up.

Preston Jackson
http://sidelightblog.blogspot.com

On Mar 2, 2009, at 11:06 AM, Benjamin Dobson wrote:


On 2 Mar 2009, at 16:42:00, Ulai Beekam wrote:


Hi,

How do I create a Safari-style pop-up menu? I'm talking about the pop-up menu (be sure to correct me if this thing is not even called a pop-up menu) that appears when you click the ">>" button to show off-screen tabs.

Just open Safari (use version 3) and keep creating new tabs until the ">>" button appears to the right. And then click that button. You will see the menu I want to achieve.

How can I programmatically make such a menu appear on my custom NSView in my mouseDown: method? Do you have some simple sample code please?

Use NSPopUpButton.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >How to create a simple pop-up-menu (From: Ulai Beekam <email@hidden>)
 >Re: How to create a simple pop-up-menu (From: Benjamin Dobson <email@hidden>)

  • Prev by Date: NSDocumentController Problem
  • Next by Date: -[UIView actionForLayer:forKey:] returns NSNull
  • Previous by thread: Re: How to create a simple pop-up-menu
  • Next by thread: Re: Optimizing, uiview caching, and clearing that cached view.
  • Index(es):
    • Date
    • Thread