After the input is complete in the text box, press enter to press OK! How to Use carriage return
Source: Internet
Author: User
After the input is complete in the text box, press enter to press OK! // ------------- Delphi two methods: 1. Judge the return key in the onkeypress event; 2. Respond to the onvalidate event in the text box. Where is the key? Click the OK button on the interface. One way is to set the default attribute of the OK button to true. In this way, the confirmation button event is executed when you press the Enter key in other buttons on the interface. Another method is to write: If key = #13 then btn_okclick (sender); // btn_ OK is the OK button in the onkeypress event of the text box. Set keypreview of form to true; write in onkeypress of edit1: If key = #13 then begin key: = #0; edit2.setfocus end; // ---------- Java ------------- in the password input box press enter to log on to the function // ------------ C # ----------------- C # The return expression method is similar to javescript if (E. keychar = 13) {MessageBox ("return the corresponding success ~~ ");}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.