[RESOLVED] [2008] User Control Accept Button
I have a user control I have created and I'm wondering how I would go about ensuring that if the user pressed the Enter key anywhere within this control that the "Search" button is clicked.
I know Forms have an AcceptButton and CancelButton property, but it doesn't seem that user controls do. Is there a way I can get the same functionality?
Thanks,
jerome
Re: [2008] User Control Accept Button
Try handling the KeyDown event, look for the Enter keypress and then perform a click on the button when found. Also, try checking if your control or its appropriate part is focused when the key is pressed.
Re: [RESOLVED] [2008] User Control Accept Button
Re: [RESOLVED] [2008] User Control Accept Button
You're welcome. Thanks for the rep.