Hovering over node image

2 posts, 0 answers
  1. Chris Kirkman
    Chris Kirkman avatar
    101 posts
    Member since:
    Apr 2010

    Posted 26 Sep 2012 Link to this post

    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.
  2. Stefan
    Stefan avatar
    2911 posts

    Posted 29 Sep 2012 Link to this post

    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.
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Back to Top