NSStatusItem menu items and custom views
NSStatusItem menu items and custom views
- Subject: NSStatusItem menu items and custom views
- From: Lieven Dekeyser <email@hidden>
- Date: Sat, 26 Jan 2008 23:21:33 +0100
Hi list,
I'm trying to take advantage of the new Leopard feature that allows
one to use custom views in NSMenuItems. To set the focus on the view
when the menu is opened, I'm using the tip suggested on this list ( http://lists.apple.com/archives/cocoa-dev/2008/Jan/msg00164.html
)
Only problem is that I'd like to do this in an NSStatusItem menu,
which means the application is not always the active application when
the menu is opened. I tried to call [NSApp
activateIgnoringOtherApps:YES]; in either the menuWillOpen: delegate
method of the menu or the viewDidMoveToWindow method, but none of this
seemed to work.. worse, it caused weird drawing issues.
Would it be possible to create a working menu with a textfield like
the SpotLight menu using NSStatusItem and custom views in menu items,
or should I try to do this using a floating window that pops up when
the user clicks in the status item?
--Lieven
_______________________________________________
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