问题描述
如何设置只要您将鼠标悬停在控件上就不会消失的工具提示?
How do I set a toolTip that doesn't go away as long as you're hovering on the control?
我尝试将AutoPopDelay"设置为 999999,但工具提示在 15 秒后消失.
I tried setting the "AutoPopDelay" to 999999, but the tooltip disappears after 15 seconds.
或者,有没有其他方法可以达到同样的效果?
Or, is there another way to achieve the same effect?
推荐答案
来自 MSDN:
有多个延迟值您可以为 Windows 窗体设置工具提示组件.单位所有这些属性的度量是毫秒.初始延迟属性决定了用户多长时间必须指向相关控件用于显示工具提示字符串.ReshowDelay 属性设置花费的毫秒数后续出现的工具提示字符串当鼠标从一个移动ToolTip 关联的控件到另一个.AutoPopDelay 属性决定ToolTip 字符串的时间长度显示.您可以设置这些值单独或通过设置值AutomaticDelay 属性的;这其他延迟属性是基于设置的在分配给的值上自动延迟属性.例如,当 AutomaticDelay 设置为一个值时N,InitialDelay 设置为 N,ReshowDelay 设置为AutomaticDelay 除以五(或N/5),并且 AutoPopDelay 设置为价值的五倍AutomaticDelay 属性(或 5N).
有关此主题的更多信息,请查看此处:
For more information on this subject, look here:
使工具提示在 Visual Basic .NET 中长时间保持可见
堆栈溢出问题我可以为 .NET Windows 窗体窗口中的工具提示设置无限的 AutoPopDelay 吗?
Stack Overflow question Can I set an infinite AutoPopDelay for a tooltip in a .NET Windows Forms window?
这篇关于永远使用 C# 的 Windows 窗体工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!