nsmenu
Determine whether an NSMenu is opened
I have an NSMenu w开发者_高级运维hich opens when a user clicks an NSStatusItem in the status bar. How can I determine if the NSMenu is opened (expanded) or not?[详细]
2023-02-02 21:21 分类:问答Gap above NSMenuItem custom view
I am using the setView: method on an NSMenuItem to set a custom view. In this custom view there is an image which takes the whole of the view. The NSMenuItem with this custom view is the first in the[详细]
2023-02-01 19:26 分类:问答Problem with disappearing NSMenuItems
I disabled \"auto-enables menu items\" for my app\'s main menu in Interface Builder because I need to disable some menus when certain views are lo开发者_如何学Caded. I am running into a problem though[详细]
2023-02-01 19:22 分类:问答How do I use the default NSMenu named "File Menu" to get the path of the selected file?
I would like to all开发者_JAVA技巧ow a user to use the file menu to select a file in the \"Open...\" selection in the \"File Menu\", and allow me to get the path of the file that was selected by the u[详细]
2023-01-29 03:29 分类:问答Cocoa validateUserInterfaceItem and menu item hiding
Using valid开发者_如何学运维ateUserInterfaceItem it is possible to disable/enable a menu item but I need a similar behaviour to hide menu items, have you some hints?- (BOOL)validateMenuItem:(NSMenuIte[详细]
2023-01-24 14:47 分类:问答Reverse engineering an NSMenu for a Status Bar Item
I\'m want to create a menu for a status bar item like the one seen in Tapbot\'s PastebotSync application:[详细]
2023-01-23 09:15 分类:问答Capture key press events while NSMenu is open
I\'m interested in capturing key presses while a NSMenu is open. For example, if the menu is open and the user presses \"e\", or \"1\" on the keyboa开发者_StackOverflow中文版rd, send a particular mess[详细]
2023-01-17 18:03 分类:问答Displaying custom/arbitrary controls in an NSMenu
How can I Display an NSTextField or an NSProgressIndicator within an NSMenu? I\'m looking to do something simila开发者_如何学JAVAr to the Spotlight icon menu, or the Help menu of most applications.You[详细]
2023-01-14 15:45 分类:问答Sync state of two NSMenuItems
I have two NSMenus with the same NSMenuItems. Only one NSMenuItem in its NSMenu should be selected. (Kind of like an NSMatrix). So I connected each NSMenuItem to the same action and added an iVar for[详细]
2023-01-13 18:08 分类:问答how to set focus on NSMenu (make it get key events)?
I have a status menu with a NSSearchField and menu items.开发者_如何学编程 When search field is active and user presses up & down arrows, I\'d like to start menu tracking, that is that the user wi[详细]
2023-01-13 00:22 分类:问答