G
Guest
I have a ListBox control on a form, and I am capturing the CTRL-C with the
KeyDown event. All works well, but I have the unwanted side effect of the
ListBox moving the currently selected item to the first Item that start with
C as well.
Example:
If the ListBox has 4 items:
apple
banana
candy
door
Once 'apple' is selected and I press CTRL-C, I handle the event in the
KeyDown method I created (basically copying the value of the item to the
clipboard), but then the selected item becomes 'candy' (I guess the framework
"thinks" I am trying to focus on the first item that starts with 'c')
How can I disable the auto focusing on the first letter behavior when the
user clicks CTRL-C. (The auto focus is actually good when the user clicks 'c'
by itself, or any other letter and the selected item becomes the item that
starts with that letter).
KeyDown event. All works well, but I have the unwanted side effect of the
ListBox moving the currently selected item to the first Item that start with
C as well.
Example:
If the ListBox has 4 items:
apple
banana
candy
door
Once 'apple' is selected and I press CTRL-C, I handle the event in the
KeyDown method I created (basically copying the value of the item to the
clipboard), but then the selected item becomes 'candy' (I guess the framework
"thinks" I am trying to focus on the first item that starts with 'c')
How can I disable the auto focusing on the first letter behavior when the
user clicks CTRL-C. (The auto focus is actually good when the user clicks 'c'
by itself, or any other letter and the selected item becomes the item that
starts with that letter).