TMemo - How to add lines of text without scrolling
Posted on 2004-09-06
Using a TMemo component, and the .Lines.Add method to add text to the component, how do I keep the TMemo from scrolling downward as I add new text to the component? In other words, if I use .Lines.Add 1000 times, the top line of the TMemo will be out of sight, and the last line will be visible in the TMemo. I would prefer if the TMemo would cease scrolling while new lines are added. Yes, I know how to rescroll the viewport/scrollbar back to the top, but this causes a flicker, and I'd much prefer to keep the TMemo frozen until all the new text has been added to it.
How can I perform this?