如何跟踪 NSMatrix 单元格中的鼠标悬停?

发布于 2024-10-10 04:20:30 字数 230 浏览 0 评论 0原文

我想跟踪 NSMatrix 中 NSCell 的鼠标悬停事件。文档说我可以将 NSMatrix 模式设置为 NSTrackModeMatrix,当鼠标位于该单元格的范围内时,单元格将收到消息 trackMouse:inRect:ofView:untilMouseUp:单元格,但是只有当我单击单元格时,此消息才会发送到该单元格。我误解了文档吗?如果是这样,我可以使用另一种方法来跟踪鼠标悬停事件吗?

谢谢

I would like to track a mouseover event of a NSCell in a NSMatrix. The documents say I can set the NSMatrix mode to NSTrackModeMatrix and the cell will be sent the message trackMouse:inRect:ofView:untilMouseUp: when the mouse is within the bounds of the cell, however this message is only sent to the cell when I click on the cell. I am misinterpreting the docs? If so is there another way I can use to track a mouseover event?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

趴在窗边数星星i 2024-10-17 04:20:30

尝试 mouseEntered:、mouseMoved:、mouseMoved: 等。

try mouseEntered:, mouseMoved:, mouseMoved: etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文