mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 11:59:25 +02:00
LCL, dbgrid, adjust editor maxlength if field is string type, issue #20406
git-svn-id: trunk@32888 -
This commit is contained in:
parent
8e855bfacf
commit
84443e864a
@ -2318,6 +2318,10 @@ begin
|
||||
{$endif}
|
||||
if (FDatalink<>nil) and FDatalink.Active then begin
|
||||
inherited SelectEditor;
|
||||
|
||||
if (Editor is TCustomEdit) and (SelectedField is TStringField) then
|
||||
TCustomEdit(Editor).MaxLength := SelectedField.Size;
|
||||
|
||||
if Assigned(OnSelectEditor) then begin
|
||||
aEditor:=Editor;
|
||||
OnSelectEditor(Self, SelectedColumn, aEditor);
|
||||
|
Loading…
Reference in New Issue
Block a user