Programmatically highlighting an NSMenuItem (was: Building a Spotlight-like custom NSMenu with an embedded NSSearchField)

2010-07-07 Thread augusto callejas
hi- i'd like to simplify my question from earlier: how do i programmatically highlight an NSMenuItem inside an NSMenu? i only see "isHighlighted" method in NSMenuItem, but no method for setting the currently highlighted menu item. thanks, augusto.___

Building a Spotlight-like custom NSMenu with an embedded NSSearchField

2010-07-07 Thread augusto callejas
hi- i've built the beginning of my own custom NSMenu with an embedded NSSearchField. i was wondering if the following behavior is possible: in spotlight, when you enter a search term, you start getting results and the first term is highlighted: http://www.genielogic.com/page7/

Re: Custom NSMenu

2008-06-15 Thread Graham Cox
I think the short answer is: you can't (in Cocoa). This has always been a bit tricky to implement, going right back to the original Mac OS c. 1984. While a pop-up is down and tracking it is handling its own event loop so is probably ignoring mouseEntered: and mouseExited: events. If your me

Custom NSMenu

2008-06-15 Thread Marco Cassinerio
I've to build e custom menu like this: | "menu item 1" | "menu item 2" | "menu item 3" | Every menu item is a NSPopUpMenu's subclass with a custom image displayed. When the user left-click on a menu item a PopUpMenu is displayed. What i would is let the user to left-click and move mouse over