Hello,
Can somebody tell me how to set a tooltip on an ultraTreeNode, I've been searching a lot lately but I can't figure it out.
is it that complicated?
I saw this code
private void ultraTree1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e) { if (e.Element is Infragistics.Win.UltraWinTree.NodeTextUIElement) { Point pt = new Point(e.Element.Rect.X, e.Element.Rect.Y); Infragistics.Win.UltraWinTree.UltraTreeNode node = this.ultraTree1.GetNodeFromPoint(pt); 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); this.ultraToolTipManager1.GetUltraToolTip(this.ultraTree1); } } else this.ultraToolTipManager1.HideToolTip(); }
but it doesn't seem to work, nothing shows up
does sy have an example of a working code?
Thx
I pasted that code as is into an existing project and it worked. If you have a simple application that you can zip and attach here, we can take a look and try to help.
The above code work fine except for a little issue where the UltraTree holds onto the last tooltip that is applied to it. So, if you leave the ultratree1 control and move the mouse back over the ultratree1, the last tooltip will popup. The else part of the code should read as follows
else
{
this.ultraToolTipManager1.HideToolTip();
this.ultraToolTipManager1.SetUltraToolTip(this.ultraTree1, null);
}