Real Software Forums
http://forums.realsoftware.com/

How to make a WebButton detect an 'enter' key?
http://forums.realsoftware.com/viewtopic.php?f=23&t=47809
Page 1 of 1

Author:  tseyfarth [ Tue May 07, 2013 12:54 am ]
Post subject:  How to make a WebButton detect an 'enter' key?

Can anyone tell me how to get WebButton detect an 'enter' key?

Thanks
Tim

Author:  Akiland [ Tue May 07, 2013 12:58 am ]
Post subject:  Re: How to make a WebButton detect an 'enter' key?

When do you want to detect the key?
If it's in a TextField you can use this in the KeyPressed event:
If Details.KeyCode = 13 or Details.KeyCode = 3 then
' Do what you want!
end if

It will detect both enter and return.

Author:  tseyfarth [ Tue May 07, 2013 12:03 pm ]
Post subject:  Re: How to make a WebButton detect an 'enter' key?

Hi Akiland,
I need to detect for an enter button. Easier to press "enter" than click it.

Tim

Author:  Jason_Adams [ Tue May 07, 2013 1:54 pm ]
Post subject:  Re: How to make a WebButton detect an 'enter' key?

He gave you the code for detecting the key, the question is when are you detecting it? If, for example, you're typing in a password, then you'd capture the button press for the text field.

Author:  timhare [ Tue May 07, 2013 3:31 pm ]
Post subject:  Re: How to make a WebButton detect an 'enter' key?

Never tried it, but can you wrap your WE page in a <form> tag and define a default action?

Author:  tseyfarth [ Wed May 08, 2013 12:59 am ]
Post subject:  Re: How to make a WebButton detect an 'enter' key?

Thanks guys, your suggestions worked perfectly!

Tim

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/