From 4ec7f482b1150d45c3f0c638a8d0769c299ee486 Mon Sep 17 00:00:00 2001 From: jesus Date: Sun, 26 Apr 2015 20:34:38 +0000 Subject: [PATCH] LCL, grids: make sure the grid is notified about text is changed on pressing the first char, issue #27955 git-svn-id: trunk@48871 - --- lcl/widgetset/wsgrids.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lcl/widgetset/wsgrids.pp b/lcl/widgetset/wsgrids.pp index 82016a7b3b..0821b9ee74 100644 --- a/lcl/widgetset/wsgrids.pp +++ b/lcl/widgetset/wsgrids.pp @@ -61,6 +61,10 @@ implementation uses LCLIntf; +type + TCustomGridAccess=class(TCustomGrid) + end; + { TWSCustomGrid } class procedure TWSCustomGrid.SendCharToEditor(AEditor:TWinControl; @@ -94,6 +98,12 @@ begin TCustomCombobox(AEditor).SelStart:=UTF8Length(GMsg.Value); end; end; + + // make sure the grid is notified that some text is changed, some + // widgets do not notify when they are modified programmatically. + if GMsg.Grid<>nil then + with TCustomGridAccess(GMsg.Grid) do + EditorTextChanged(Col, Row, Ch); end; class function TWSCustomGrid.InvalidateStartY(const FixedHeight, RowOffset: Integer): Integer;