My custom Control displays a TextBox when a key is pressed (basically to allow for numeric input). It's easy enough to show the TextBox from inside the KeyDown event on the main control, but how do I pump the keypress into the textbox?
A:
Why dont you keep a buffer ( a variable) to store the value of KeyPress and after the TextBox is Enabled, update the value?
abhishek
2010-08-29 23:29:07
What do you mean by "update the value"?
David Rutten
2010-08-30 09:57:21
A:
You can use the KeyValue of the KeyEventArgs parameter (sent to the method handling the keydown event of your user control).
Using that you can send the first key to the textbox and then move the focus to the textbox like suggested before.
Hope I understood you well.
Neowizard
2010-10-17 12:35:40