Hello,
I am using Infragistics2.Win.UltraWinTree.v9.1.
I am setting tooltips for the tree nodes as below. I am able to display tooltips on mouse hover over the nodes. But when the user moves mouse over the the empty space on the treeview, the tooltips are displayed. How to not to show tooltips over empty space on the treeview?
private void ultraTree1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) { if (e.Element is Infragistics.Win.UltraWinTree.NodeTextUIElement) { // Get the location of the cursor Point pt = new Point(e.Element.Rect.X, e.Element.Rect.Y); Infragistics.Win.UltraWinTree.UltraTreeNode node = this.ultraTree1.GetNodeFromPoint(pt);
// If the cursor is on a Tree node if (node != null) { Infragistics.Win.UltraWinToolTip.UltraToolTipInfo tipInfo = new Infragistics.Win.UltraWinToolTip.UltraToolTipInfo(node.Text, Infragistics.Win.ToolTipImage.Default, "", Infragistics.Win.DefaultableBoolean.True); this.ultraToolTipManager1.SetUltraToolTip(this.ultraTree1, tipInfo); this.ultraToolTipManager1.ShowToolTip(this.ultraTree1); } } }
Thanks,
Naveen
You need to clear the tooltip when the mouse leaves the nodes. So the code you have here only checks for a NodeUIElement, but when you enter any other element, you left the tooltip set to what it was for the last node.
The check for NodeUIElement seems redundant here, anyway. You are already using GetNodeFromPoint, so you could easily just use that method to get a node. If you get a node, set the Tooltip to what you want, and if you don't get a node, clear the tooltip.
I am using UltraTree where i have set Node.LeftImages.
It show tree like below
I want to show tooltip on each left image when user hover over on image.
Is there a way i can set tooltip on LeftImage hover over? if yes how can i set?
any code example appriciated.
thanks in advance.