开发者

ToolTip Stay displayed

In C#, how开发者_如何学Go can I make a ToolTip remain displayed until the mouse move out of the ToolTip region. No matter what delay I set it stay displayed.

I tried to change AutoPopDelay, InitialDelay, and ReshowDelay properties to 0 but the only way I can see is to set the delay to a very large value which is not what I'm looking for.


That's not possible. The native Windows control has hard-coded behavior to make the tip disappear when it has been shown long enough. There's no way to override that behavior.

A tooltip that is permanent is a Label.


ToolTip.StopTimer Method can be used to prevent the ToolTip from disappearing after n seconds.

Ref: http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.stoptimer.aspx


J.B, you can write an attached behavior (e.g: similar to the .Net ToolTipService class) and then you have a full control of when to show hide the tool tip as a matter of focus. However, I think you can still get that with the ToolTipService.ShowDuration and setting it int.Max (that would be something like 20 days...)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜