From 2298d92d57e77499c734d9292dbca3d1bc616069 Mon Sep 17 00:00:00 2001 From: jesus Date: Tue, 17 Feb 2009 04:02:22 +0000 Subject: [PATCH] LCL, When backspace/delete is pressed in a readonly TDBEdit, suppress the key, from Joost, issue #13176 git-svn-id: trunk@18722 - --- lcl/include/dbedit.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lcl/include/dbedit.inc b/lcl/include/dbedit.inc index 10326c07d1..7334577b36 100644 --- a/lcl/include/dbedit.inc +++ b/lcl/include/dbedit.inc @@ -151,9 +151,11 @@ begin SelectAll; Key := VK_UNKNOWN; end else - if Key=VK_DELETE then begin + if Key in [VK_DELETE, VK_BACK] then begin if not IsReadOnly then - FDatalink.Edit; + FDatalink.Edit + else + Key := VK_UNKNOWN; end else if Key=VK_TAB then begin if FDataLink.CanModify and FDatalink.Editing then