This solution does not do exactly the same, ie. what I needed, but it can be useful for others.
From your original Q it was not entirely clear what functionality you sought (e.g. how exactly to write into the memo).
Note that afaik the solution as showed is the most identical to the original write/writeln combination, without having to go into detailed coding yourself.
Btw. I tried similar thing via the StreamIO but forgot to call Rewrite and got some IO error.
Yups, a common mistake i make often myself as well
EDIT: Actually this solution can be persuaded to do the same, ie. not to rewrite entire memo content after each call:
I did wrote _poor person's_ solution. That was with reason
You can make it do whatever you'd like it to do, which includes filling the memo only and not write to the stringstream at all.
However and as stated before. It is awkward with regards to supporting write and writeln as you'd have to keep track when the last write was terminated with a cr/lf or not and depending on the answer fall back to the previous line and concat to that line first (again, if wanting to support write + writeln combination).
Glad that you could make things work the way you'd liked them to be. Thanks for having checked my (well, heavily inspired by one of our other forum members, unfortunately can't remember who it was exactly) solution and reporting back.