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
140
How to determine if user selected a TreeNode
posted

Hi,

I have a project with a UltraTree control and I'd like to be able to determine if a tree node was selected by the user (mouse click or keboard select).

I have an event handler for the AfterSelect event, but I don't know of a good way to tell when the user selected the tree node, versus when the node's select flag gets set to true from my code.

I suppose I could set some bool flag when mouseClick or KeyPressed event occurs, but I am hoping there is a cleaner way to do this.

Please help.

Thanks,
Jason

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Jason,

    There's no way to tell this via the events. But you know when your code selects a node - so you could set a flag to indicate when your code is doing it and when that flag is not set, you will know the user did it.

Children
No Data