如何让鼠标移到面板上时出现面板?德尔菲
当我将鼠标移到某个位置时,如何才能显示一个面板及其中的所有内容?
当我再次将其移开时,它会消失吗?
当它可见时执行此操作不是问题(除了淡出),我可以使用 onmouseleaves 执行此操作。
但是当它不可见时,如何使其可见呢?
谢谢
How can I make a panel appear with everything that is in it when I move my mouse over its location?
When I move it off again, it fades back out?
Doing it when it is visible is not a problem (except the fading out), I can do this with onmouseleaves.
But when it is invisible how do you make it visible?
thankssss
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将面板放在另一个(空白)面板上。当您将鼠标移动到空白面板上时,使“神奇”面板显示出来。
编辑,因为我现在了解到 OP 在网络浏览器上有面板。我放置虚拟/空白面板的解决方案不再有效;干扰发送到 Web 浏览器的鼠标消息也不是一个好主意,因此这里有一个简单的方法来解决此问题。我正在使用 TTimer,其间隔设置为“100”,并且我正在汇集鼠标坐标。
Put the panel on another (blank) panel. Make the "magic" panel show up when you get mouse movement over the blank panel.
Edited, because I now learned the OP has the Panel over a WebBrowser. My solution of placing an dummy / blank panel no longer works; Interfering with mouse messages going to the WebBrowser is also not a good idea, so here's a simple way to fix this. I'm using an TTimer with it's interval set to "100" and I'm pooling the mouse coordinates.
如果您的面板将出现在一个区域中,您可以捕获底层表单或父面板的鼠标移动事件,并检查它是否在您的不可见面板将出现的范围内
。 (伪代码)
If you have an area that your panel will appear in, you can capture the mouse move event for the underlying form or parent panel and check it is within the bounds that your invisible panel will appear in.
eg. (pseudocode)