Re: Spotlight-Like Menu-Item - How To?
Re: Spotlight-Like Menu-Item - How To?
- Subject: Re: Spotlight-Like Menu-Item - How To?
- From: Nathan Kinsinger <email@hidden>
- Date: Fri, 20 Feb 2009 08:30:09 -0700
On Feb 19, 2009, at 12:49 PM, Heiko wrote:
Hello!
I searched the archives but did not find what I'm looking for.
I would like to implement a Spotlight-like Menuitem, using
NSStatusBar and NSMenu, one of the NSMenuItems being a
NSSearchField. Is this possible? And if "yes" how can it be done?
Maybe someone can point me into the right direction.
Thanks!
Heiko
You will need to set up a view that has your search field in it.
If you are targeting 10.5+ you can put a view directly in a menu:
<http://developer.apple.com/documentation/Cocoa/Conceptual/MenuList/Articles/ViewsInMenuItems.html
>
If you need 10.4 support then set up a window with your search view in
it to open up underneath your status menu. There is an example here:
<http://mattgemmell.com/2008/03/04/using-maattachedwindow-with-an-nsstatusitem
>
--Nathan
_______________________________________________
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