I mentioned this problem before about detecting when TMemo's lines property changed and…
Shane Miller wrote 6 lines
The Flines in TMemo are declared as FStrings, but they are assigned a TMemoStrings in the Create method of TMemo. TMemostrings is a TStrings descendant that is Memo-aware; i.e. when it changes, it notifies the memo about it.
You could do it with a TStringlist and it's onchange handler, but I think it is better to make a TMemoStrings, which could be more adapted to the specifics of a memo.
Of course then you must not forget to do a
Procedure TMemo.SetStrings(Avalue : TStrings);
begin
FLines.Assign(AVAlue);
end;Because assigning a TStringlist to a TMemoStringlist directly wouldn't work :-)
Michael.
