Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Intraweb 14 TIWButton



Permlink Replies: 2 - Last Post: Mar 8, 2018 4:33 PM Last Post By: Daniel Fields
Elzaan Fourie

Posts: 4
Registered: 6/23/07
Intraweb 14 TIWButton
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 8, 2018 1:42 AM
How do I activate the click event of a TIWButton when the ENTER key is clicked?
I'm on Delphi 10.2 and Intraweb 14
Jose Nilton Pace


Posts: 122
Registered: 5/15/98
Re: Intraweb 14 TIWButton
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 8, 2018 7:16 AM   in response to: Elzaan Fourie in response to: Elzaan Fourie
Hi Elzaan. If i understood, you can put extra code in ScriptEvents, onKeyDown for example.
if (event.keyCode == 13)
{
   IWBUTTON1IWCL.click();
} 
return true;

or
if (event.keyCode == 13)
{
   SubmitClickConfirm('IWBUTTON1','', true, '');
} 
return true;
Daniel Fields

Posts: 622
Registered: 11/29/04
Re: Intraweb 14 TIWButton
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 8, 2018 4:33 PM   in response to: Elzaan Fourie in response to: Elzaan Fourie
You could also use the OnAsyncKeyPress event for an edit control.

procedure TFormLogin.IWEdit1AsyncKeyPress(Sender: TObject; EventParams: TStringList);
begin
  if EventParams.Values['which']='13' then  //some 3rd party controls use 'key' instead of 'which'
  begin
      IWButton1Click(Sender);    
  end;
end;
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02