This is a migrated thread and some comments may be shown as answers.

Hovering over node image

1 Answer 115 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Chris Kirkman
Top achievements
Rank 1
Chris Kirkman asked on 26 Sep 2012, 06:06 PM
I can use the "NodeMouseHover" event to know whether or not I am physically hovering over the node, but how can I tell if I'm over the image which is displayed with the node?

Seems simple enough, but not so far.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 29 Sep 2012, 08:20 AM
Hello Chris,

Thank you for writing.

You can use the MouseMove event of RadTreeView to determine over which element is the mouse, since this event provides the current mouse position. Here is an example:
void radTreeView1_MouseMove(object sender, MouseEventArgs e)
{
    TreeNodeImageElement imageElement = radTreeView1.ElementTree.GetElementAtPoint(e.Location) as TreeNodeImageElement;
    if (imageElement != null)
    {
       //you are over image element
    }
}

I hope this helps.
 
Regards,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
Treeview
Asked by
Chris Kirkman
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or