NSMenuItem和NSPopOver [英] NSMenuItem and NSPopOver

查看:356
本文介绍了NSMenuItem和NSPopOver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在OS X应用程式上,当滑鼠游标移到NSMenuItem(例如聚光灯)时,显示NS​​Popover的技术是什么。




Christopjhe

解决方案

我知道已经有一段时间,但如果你还没有找到解决方案:将 NSMenuDelegate 注册到包含 NSMenuItem 的菜单中,将您的类注册为


$ b < c>,并实现

   - (void)菜单:(NSMenu *)菜单willHighlightItem: 

然后在调用此方法时显示popover。


On OS X app, what is the technique to show a NSPopover when the mouse is over a NSMenuItem (like in spotlight for example).

Thanks a lot!!! Christopjhe

解决方案

I know it's been a while, but if you still haven't found a solution:

Register your class as a NSMenuDelegate to the menu that contains the NSMenuItem, and implement

- (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item;

then show the popover when this method is called.

这篇关于NSMenuItem和NSPopOver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆