Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
502
Tooltip on ultranode
posted

 

 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

  • 69832
    Offline posted

    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.