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
2395
Key Events in a Wintree not firing?
posted

I have an UltraTree that I'm trying to setup where the delete key will delete the selected node, but I'm having problems getting any of the key events (keyUp, keyDown, kePress) to be triggered. I know they are being consumed by something internal to the tree itself since whenever I press any alphanumeric key, the tree will jump to any node that has the first few letters, e.g. if I have a node Titled 'Car' and press the 'c' and 'a' it will jump to that node. Do I need to disable or override some internal event in order to check for the delete key?

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    The reason you aren't getting the key events for the delete key is that the base class implementation for the control's IsInputKey method does not return true for that key. Note that if you are using the 'Standard' ViewStyle you can set the UltraTree.Override.AllowDelete property to true to allow the user to delete nodes by pressing the delete key. Otherwise you would have to derive from UltraTree and override IsInputKey, and implement the deletion logic yourself.

Children