Click Not Firing when Icon Clicked

2 posts, 0 answers
  1. Kim
    Kim avatar
    47 posts
    Member since:
    Jul 2013

    Posted 28 Nov 2013 Link to this post


    This is possibly something I am overlooking but when I click the icon on a node the "nodeclicked" event does not fire but if i click the text it does.

    The highlight moves to the correct node in both cases.

    Also, if i click on the white space to the left of the icon, same behavior, no click event fires, but the highlight changes.

    Any Help?

    Kim

  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 02 Dec 2013 Link to this post

    Hello Kim,

    Thank you for writing.

    I can confirm that the NodeMouseClick event is not fired when you click the ImageElement or the LinesContainerElement. It is not fired because the default value of the ShouldHandleMouseInput property of the both elements is true. So to change this behavior you should set this property to false for example you can do that in the CreateNodeElement event handler:
    void TreeViewElement_CreateNodeElement(object sender, CreateTreeNodeElementEventArgs e)
    {
        e.NodeElement = new TreeNodeElement();
      
        e.NodeElement.ImageElement.ShouldHandleMouseInput = false;
        e.NodeElement.LinesContainerElement.ShouldHandleMouseInput = false;
    }

    I hope this helps. Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top