Cocoa:自动关闭状态菜单
我的状态栏上有一个状态菜单,并且有一些任务在后台运行。当其中一项任务完成时,假设在显示菜单(下拉)时,我想让菜单自动不处于下拉模式(假装在菜单图标上单击鼠标左键)。有办法做到这一点吗?
I hava a status menu on the status bar, and I have some tasks running behind the scene. When one of task is done, assume at the time the menu is being showed (dropped down), I want to make the menu to be not in drop down mode (pretend doing a left click on the mouse on the menu icon) automatically. Is there a way to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它就在那里,但名字有点违反直觉:你想要 NSMenu 的
取消跟踪
。It's there, but the name is a little bit counterintuitive: You want NSMenu's
cancelTracking
.