alesf76 Posted December 27, 2017 Share Posted December 27, 2017 I would like that when I press enter on the login form, it behaves like a cliked on the "ok" button. Is it possible ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 27, 2017 Share Posted December 27, 2017 Hi, Yes it's possible, please specify which edition and build are you using? Best regards, Quote Link to comment Share on other sites More sharing options...
alesf76 Posted December 27, 2017 Author Share Posted December 27, 2017 Hi, Yes it's possible, please specify which edition and build are you using? Best regards, For now, trial. Going to buy Professional if everything goes well Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 27, 2017 Share Posted December 27, 2017 Hi, For example like this: procedure TUniLoginForm1.UniLoginFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = VK_RETURN then UniButton1.Click end; or better in two controls (usernameEdit, passEdit) Quote Link to comment Share on other sites More sharing options...
alesf76 Posted December 27, 2017 Author Share Posted December 27, 2017 Hi, For example like this: procedure TUniLoginForm1.UniLoginFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = VK_RETURN then UniButton1.Click end; or better in two controls (usernameEdit, passEdit) It works, but it doesn't trigger masking like when I click on the button. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 27, 2017 Share Posted December 27, 2017 It works, but it doesn't trigger masking like when I click on the button. Also you can try like this: procedure TUniLoginForm1.UniLoginFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = VK_RETURN then with UniButton1 do JSInterface.JSCall('fireEvent', ['click', JSControl]); end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.