Trapping and suppressing Enter key in a rich edit

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu