Re: How to create a simple pop-up-menu
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