开发者

NSView in NSMenu -- how to make "key" for accepting keyboard commands [specifically, return]

I have a text field and a button living in a view inside a menu item. The button submits the string in the text field to a function, and that works fine. However, I've also set the button's key equivalent to "return." The key command isn't being picked up, prob开发者_如何学Pythonably because the menu is not the "key" window.

I know how to make a window the key window (makeKeyAndOrderFront) -- what's the equivalent for a view living in a menu?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜