>>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.


   There is a way to do it. Have a look at the RichEdit demo application under 
the "demos" folder... I don't know if it's still there in later versions since 
I'm still using v. 6.

Dave

--- On Fri, 4/2/10, Glenn B. Lawler <[email protected]> wrote:

From: Glenn B. Lawler <[email protected]>
Subject: RE: [delphi-en] Detecting Change - RichEdit
To: "'[email protected]'" <[email protected]>
Date: Friday, April 2, 2010, 12:24 PM







 



  


    
      
      
      >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...@yahoogrou ps.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...@yahoogrou ps.com [mailto:delphi...@yahoogrou ps.com] On Behalf

Of c80840

Sent: vrijdag 2 april 2010 14:42

To: delphi...@yahoogrou ps.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.





    
     

    
    


 



  






      

[Non-text portions of this message have been removed]

Reply via email to