|
-
May 2nd, 2008, 09:51 AM
#1
Does a UserControl have something similar to the ‘AcceptButton’ property of a Form?
I have a UserControl that contains lots of TextBoxes, ComboBoxes, Buttons, etc.
The UserControl has one specific button that I want to be clicked whenever the user presses 'Enter' on any of the controls contained in the UserControl.
If I were dealing with a Form, I would use its ‘AcceptButton’ property.
What do I do when dealing with a UserControl?
One way is to implement the ‘KeyDown’ event of each control, check if the ‘Enter’ key was pressed, and if so call the ‘Click’ event of that button.
But, is there another solution?
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
|