Cocoa - Capturing NSStatusItem mouse hover event

血红的双手。 提交于 2019-12-07 18:23:29

问题


How do I execute a function when a user's mouse hovers over my NSStatusItem?


回答1:


If you assign a custom NSView to your NSStatusItem's view property, you can override the NSResponder methods mouseEntered:, mouseMoved: and mouseExited:.



来源:https://stackoverflow.com/questions/5114974/cocoa-capturing-nsstatusitem-mouse-hover-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!