![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Mon, Jul 9 2012 7:36 AM | Permanent Link |
Matthew Jones | Is there any way to make a button the "default" button? Or somehow process the
Enter key on the form so that it does some action? /Matthew Jones/ |
Mon, Jul 9 2012 12:42 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Matthew,
<< Is there any way to make a button the "default" button? Or somehow process the Enter key on the form so that it does some action? >> Sure, if you check out the Master-Detail Example (\examples\masterdetail) in the latest builds, you'll see how this is one with the lookup dialogs (LookupCust, LookupProduct): 1) Make sure that the form's KeyPreview property is set to True. 2) Add code like this: function TLookupCustomerDlg.LookupCustomerDlgKeyDown(Sender: TObject; Key: Integer; ShiftKey, CtrlKey, AltKey: Boolean): Boolean; begin case Key of VK_RETURN: begin ModalResult:=mrOK; Result:=False; end; VK_ESCAPE: begin ModalResult:=mrCancel; Result:=False; end; else Result:=True; end; end; If you have any other questions, please let me know. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Thursday, March 23, 2023 at 02:07 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |