忽略面板上标签上的鼠标事件

编程入门 行业动态 更新时间:2024-10-25 12:25:32
本文介绍了忽略面板上标签上的鼠标事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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...

更多推荐

忽略面板上标签上的鼠标事件

本文发布于:2023-11-11 18:40:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579257.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:鼠标   面板   签上   事件   上标

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!