From defbc455bc43f9b57f908a5f24222c292a958ab7 Mon Sep 17 00:00:00 2001 From: blikblum Date: Wed, 30 Dec 2009 12:02:16 +0000 Subject: [PATCH] lcl: On TDBEdit.DataChange only set the MaxLength to Field.Size if is a String field and if MaxLength = 0 (Delphi compatible), , fixes bug #15443 git-svn-id: trunk@23321 - --- lcl/include/dbedit.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lcl/include/dbedit.inc b/lcl/include/dbedit.inc index 6760347914..547094ebbe 100644 --- a/lcl/include/dbedit.inc +++ b/lcl/include/dbedit.inc @@ -40,7 +40,8 @@ begin end else //otherwise display the pretified/formated text since we can't EditText := FDataLink.Field.DisplayText; - MaxLength := FDatalink.Field.Size; + if (FDataLink.Field.DataType = ftString) and (MaxLength = 0) then + MaxLength := FDatalink.Field.Size; end else begin //todo: uncomment this when TField implements EditMask