开发者

c# NodeMouseOver Tooltip

开发者 https://www.devze.com 2023-01-22 07:51 出处:网络
I have the following code: if (e.Node.Level == 2 && e.Node.Name.Contains(\"PI3K1003\")) toolTip1.Show(\"test\",_tv);

I have the following code:

if (e.Node.Level == 2 && e.Node.Name.Contains("PI3K1003")) toolTip1.Show("test",_tv);

It works when I do hover the mouse over the appropriate node. However, when I leave the treeview control and then move the mouse back开发者_如何学运维 onto the control, the tooltip displays straight away, even though I am not hovering over this node?

Any ideas why?

Thanks.


It is because you told the ToolTip control to show the tip for the entire TreeView, not just the node. Consider the TreeNode.ToolTipText property instead.

0

精彩评论

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