忽略面板上标签上的鼠标事件 [英] ignore mouse event on label inside panel

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

问题描述

我正在制作自定义菜单.我在鼠标进入和鼠标离开时在面板上应用颜色.

I am making a custom menu. I am applying colors on panels on mouse enter and mouse leave.

我在这些面板上有标签,并且鼠标的进入和离开事件工作迅速,但是当我将鼠标悬停在面板上(内部/内部)的标签上时,就会触发鼠标离开事件.我知道我可以为标签鼠标进入事件做同样的事情,但是我在做其他视觉操作,所以我需要完全忽略标签鼠标事件.有什么想法吗?

I have labels on these panels, and the mouse enter and leave events work snappy, but as soon as I hover over the label (on/inside) the panel, the mouse leave event is fired. I know I can just do the same thing for the label mouse enter event, but I am doing some other visual stuff, and I need to have the label mouse events totally disregarded. Any ideas?

提前谢谢.

推荐答案

我最终只是使用了菜单控件,并相应地设置了样式.做得比我用代码做得更好吗?

I eventually just used the menu control, and styled it accordingly. Does the job better than I could with code...

这篇关于忽略面板上标签上的鼠标事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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