Hi, I have a form which has a text box and an OK button. After entering a value in the text box I would like to be able to hit the enter key to initiate the action that the OK button does. I haven't been able to work this out. Currently the only option is to use the mouse to click on the OK button. Can anyone help out with this?
Cheers
Wayne
Enter Key Action
Enter Key Action
The
form has a property called AcceptButton. Set this property to the Ok Button in
the designer and it should fire when you press enter.For
more details on the controls, I suggest looking out our Spotlight on
Controls blog series. We have articles on both the Form and Button controls. David
form has a property called AcceptButton. Set this property to the Ok Button in
the designer and it should fire when you press enter.For
more details on the controls, I suggest looking out our Spotlight on
Controls blog series. We have articles on both the Form and Button controls. David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- wayne_Avery
- Posts: 30
- Last visit: Tue Feb 01, 2022 2:25 pm
Enter Key Action
Brilliant! I don't know how I missed that property. Works like a charm. Many thanks - Wayne