>I always use the RichEdit.Modified property to determine whether the content >has been changed.
>>I hope you can help. I'm writing a program to modify text files. What I do >>is load the file in a RichEdit control (set to plain text only), and modify >>the data. Then I plan on saving it back out, if there were changes made. >>Unless I missed something, I can't find a property that flags this (e.g. >>RichEdit1.<whatever>). The Modified property is what I use. Be aware that all is does is change to True whenever any change is made to the contents of the control since the last time Modified was set to False. So, after loading text in the control, you need to do Modified:=False. When you save the contents to a file and continue editing, you will probably reset Modified also. Modified is also a property of TMemo. The downsize to TMemo is limited size. >>RichEdit1.<whatever>). Then, on top of this, let's say the RichEdit control >>had "ZZZ" added to it, then I used CTRL-Z to remove it, which put it back to >>the way it was originally loaded. If there is such a property, will it >>figure out what it is still the same, since the CTRL-Z removed the "ZZZ"? The answer is no. It only tracks when a change is made. Glenn Lawler www.incodesystems.com -----Original Message----- From: Peter Luijer [SMTP:p.lui...@hccnet.nl] Sent: Friday, April 02, 2010 12:28 PM To: delphi-en@yahoogroups.com Subject: RE: [delphi-en] Detecting Change - RichEdit I always use the RichEdit.Modified property to determine whether the content has been changed. Greetz, Peter. ________________________________________ From: delphi-en@yahoogroups.com [mailto:delphi...@yahoogroups.com] On Behalf Of c80840 Sent: vrijdag 2 april 2010 14:42 To: delphi-en@yahoogroups.com Subject: [delphi-en] Detecting Change - RichEdit Hi all: I hope you can help. I'm writing a program to modify text files. What I do is load the file in a RichEdit control (set to plain text only), and modify the data. Then I plan on saving it back out, if there were changes made. Unless I missed something, I can't find a property that flags this (e.g. RichEdit1.<whatever>). Then, on top of this, let's say the RichEdit control had "ZZZ" added to it, then I used CTRL-Z to remove it, which put it back to the way it was originally loaded. If there is such a property, will it figure out what it is still the same, since the CTRL-Z removed the "ZZZ"? Thanks in advance.