I use forms to allow users to enter in filters for a report. When the user clicks on my OK button it then runs the report. I would like to have so that if a user presses there Enter key it will act as if the OK button was pressed. Right now if they press Enter it runs my report but does not run my script that is tied to the OK button. I have set the ok button to be the default button. I think it only ignores this when a textbox has focus. Any help with this would be appreciated.
Mat
Capture Enter Key
Capture Enter Key
I set my "OK" buttons to [Default = True, Cancel = False, DialogResult = OK] and "Cancel" button to [Default = False, Cancel = True, DialogResult = Cancel]
But you say you've already set Default to true? Maybe there's two buttons with default set to true?
But you say you've already set Default to true? Maybe there's two buttons with default set to true?
Capture Enter Key
I have it set exactly as you have yours. It seems to ignore the Default=true when your cursor is in a text box.
Mat
Mat
Capture Enter Key
It's not a multi line textbox no?
Capture Enter Key
We've found the following inaccuracy:
When you press the "Enter" key, the Text property of the TextBox component remains unchanged and the Click event Handler is called with its previous value. We will correct this value in the next prerelease build.
But "Click" Event Handler for "OK" button is always called.
Thank you.
When you press the "Enter" key, the Text property of the TextBox component remains unchanged and the Click event Handler is called with its previous value. We will correct this value in the next prerelease build.
But "Click" Event Handler for "OK" button is always called.
Thank you.
Capture Enter Key
I have the text box set to not accept returns and it is not a multiline box either.
Thanks for looking into this.
Mat
Thanks for looking into this.
Mat