On Mar 21, 2007, at 10:55 AM, Christopher Rosado wrote:
> Is there any way to stop the
> Return key from appending to my EditField?
>
> <snip>
> If Keyboard.AsynckeyDown(&h24) or Keyboard.AsynckeyDown( &h4c) then
> MsgBox "You Pressed the Enter or Return Key"
> Else
> End if
If you wish to avoid REALbasic from processing any keypress in the
Keydown event of an EditField, you should Return True.
You also do not need to use Keyboard.AsynckeyDown as both keys return
an ASCII value in the Keydown event.
These are Chr(13) for the Return key and Chr(3) for the Enter key.
Your code would be something like:
(In the KeyDown event:)
If key=Chr(13) or Key= Chr(3) Then
[MsgBox "You Pressed the Enter or Return Key"]
Return True
End If
or, without the message:
If key=Chr(13) or Key= Chr(3) Then Return True
//rest of code (if any) here
Terry
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>