处理禁用节点上的事件 [英] Handle event on disabled Node

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

问题描述

有什么方法可以处理鼠标单击,例如在禁用元素上?我的任务是禁用列表,并双击后启用它.

Is there any way to handle, mouse click, for example on disabled element? My task is to have disabled list and make it enabled after double click on it.

推荐答案

禁用的节点不接收鼠标或按键事件.

A disabled Node does not receive mouse or key events.

请参见官方文档

您可以将节点包装到另一个节点中,并在子节点被禁用的情况下在那里处理鼠标事件.

You could wrap the node into another node and handle the mouse events there in case the child node is disabled.

这篇关于处理禁用节点上的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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