禁用NSImageView的用户交互 [英] Disable user interaction for NSImageView

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

问题描述

我有2套图片。一组包含可拖动的组,另一组是静态组。我已经为可拖动图像实现了拖放功能。这是因为图像需要被拖动到包含匹配的静态图像。现在将拖动的图像放在静态图像之后,与它无关,因此我想禁用图像的用户交互(因为它仍然是可拖动的)。

I have 2 sets of images. One set contains draggable ones and other is a static set. I have implemented drag-drop functionality for the draggable images. This is because the images needs to be dragged to static ones which contains matches. Now after placing the dragged image on the static one, there is nothing to do with it, hence I want to disable user interaction for image (since it's still draggable).

我已探索过几个解决方案和SO问题此处在这里,但没有解决方案有帮助!

I have explored several solutions and SO questions here and there , but none of the solutions helped!

请提前感谢大家:)

推荐答案

创建自定义类的NSImageView并实现鼠标输入和鼠标退出方法与空定义

Create custom class of NSImageView and implement mouse entered and mouse exit method with empty definition

这篇关于禁用NSImageView的用户交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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