This is a migrated thread and some comments may be shown as answers.

The enter key in the key down event

0 Answers 76 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
simeon
Top achievements
Rank 1
simeon asked on 08 Sep 2009, 10:48 AM
We have a treeview that is displaying a menu for our application.  What I would like to be able to do is when we press the enter key on a node that does not have any children is handle the enter key press in code behind.  The default behavoiur does not allow this to happen as the enter key does not seem to get passed to the key_down event.  I presume this is by design as the other control keys (+-/*) dont raise the key_down event as well.  Any idea's how to work around this?  As the enter key is the natural key to press to our users to start navigation.

EDIT

(Nevermind got to stop thinking like a winform programmer you simply handle the keyup as that event seems to be bubbled through and it works cool)


Cheers,

Simeon

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
simeon
Top achievements
Rank 1
Share this question
or