Fixes support for special keys on TDBMemo. Fixes bug #8029

git-svn-id: trunk@13000 -
This commit is contained in:
sekelsenmat 2007-11-24 11:21:20 +00:00
parent 2b483ab1b4
commit 3e4e7f0f00

View File

@ -186,6 +186,7 @@ procedure TDBMemo.KeyPress(var Key: Char);
end;
begin
inherited KeyPress(Key);
case key of
#32..#255: // alphabetic characters
CheckValidChar;
@ -197,10 +198,14 @@ begin
FDatalink.Reset
else
Key:=#0;
^X,^V, #8: // special keys
// Verifyes if we are in edit mode for special keys may change the text
// Ctrl+I = Tab
// Ctrl+J = LineFeed
// Ctrl+H = Backspace
^X, ^V, ^Z, ^I, ^J, ^H:
CheckEditingKey;
else
Key := #0;
// Don't do anything for special keys that don't change the text
// Like Ctrl+C for example
end;
end;