Enter Key Action

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 12 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
wayne_Avery
Posts: 30
Last visit: Tue Feb 01, 2022 2:25 pm

Enter Key Action

Post by wayne_Avery »

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
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Enter Key Action

Post by davidc »

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
David
SAPIEN Technologies, Inc.
User avatar
wayne_Avery
Posts: 30
Last visit: Tue Feb 01, 2022 2:25 pm

Enter Key Action

Post by wayne_Avery »

Brilliant! I don't know how I missed that property. Works like a charm. Many thanks - Wayne
This topic is 12 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.