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
470
Click event firing after releasing mouse when using scrollbar.
posted

When a user clicks on a node, I want call a method. The problem is that when they use the scrollbar, the click even is firing, and calling the method. I only want this to happen when they click on a node, not the scroll bar.

How do I determine what they clicked on?

  • 469350
    Offline posted

    Typically, you would use the AfterActivate event. That way the code executes if the user changes the active node via either the keyboard or the mouse.

    But if that does not work for you and you need to handle Click, then I recommend using the MouseDown or MouseUp event instead. Then you can use the GetNodeFromPoint method to determine which node (if any) was clicked.