tags:

views:

264

answers:

2

I have a normal textbox in my application. I can paste to it using my mouse but Ctrl+v does nothing.

How do I fix that?

+8  A: 

Make sure that yourTextBox.ShortcutsEnabled is set to true.

Andrew Hare
Note that if `ShortcutsEnabled` is `false` this also suppresses the standard context menu of the `TextBox` control, which would prevent pasting using the mouse.
Fredrik Mörk
+8  A: 

This behavior is enabled by default, so the question is rather what your code does to prevent it. Do you have any KeyDown/KeyUp/KeyPress event handlers that may intercept the CTRL+V keystrokes?

Fredrik Mörk
+1 Good thought.
Andrew Hare