|
-
Oct 29th, 2008, 03:10 PM
#1
Thread Starter
Hyperactive Member
[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
-
Oct 29th, 2008, 03:49 PM
#2
Frenzied Member
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.
Please rate helpful ppl's posts. It's the best 'thank you' you can give 
-
Oct 29th, 2008, 04:10 PM
#3
Thread Starter
Hyperactive Member
Re: [RESOLVED] [2008] User Control Accept Button
-
Oct 30th, 2008, 03:17 PM
#4
Frenzied Member
Re: [RESOLVED] [2008] User Control Accept Button
You're welcome. Thanks for the rep.
Please rate helpful ppl's posts. It's the best 'thank you' you can give 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|