Trapping and suppressing Enter key in a rich edit
- Posted by jtemple at yhti.net Apr 09, 2004
- 505 views
All, I want to prevent the Enter key from inserting a CR/LF in a rich edit control. I've tried the following: -------------------------------------------------------------------------------- procedure StatementRE_onKeyPress (integer self, integer event, sequence params)--params is ( int keyCode, int shift ) -- When the user presses enter just execute the sql statement if params[1] = VK_ENTER and enter_exec_sql then execute() returnValue(True) end if end procedure setHandler( StatementRE, w32HKeyDown, routine_id("StatementRE_onKeyPress")) but I still get a CR/LF in the rich edit. I can't quite figure this one out. Maybe it's impossible in a rich edit? TIA, Jonas