TStrings.BeginUpdate/EndUpdatewill ban events OnChangingand OnChanged. It does not affect the internal processing of changes to the content itself.
TMemo.Linesimplemented TMemoStrings, which stores text content in the Window control itself. So BeginUpdate/EndUpdatehere is useless.
, TStringList Text TMemo TStringList . Text TMemo.
lst := TStringList.Create;
try
lst.Text := Memo1.Lines.Text;
for I := 0 to lst.Count - 1 do begin
lst[I] := SomeTrim(lst[I]);
end;
Memo1.Lines.Text := lst.Text;
finally
lst.Free;
end;
.. Assign Text Memo: Assign - Text TMemoLines. Getter Setter Windows WM_GETTEXT/WM_SETTEXT, Assign EM_GETLINE EM_LINEINDEX, EM_SETSEL, EM_LINEELENGTH EM_REPLACESEL . , 600 Text Assign 11 !