How can I tell if a text item has been modified

General TRichView support forum. Please post your questions here
Post Reply
phorst
Posts: 2
Joined: Thu Mar 17, 2011 10:00 pm

How can I tell if a text item has been modified

Post by phorst »

In my application, I load multiple paragraphs of text to TRichViewIedit component using AddTextNL.

Upon saving the contents of the editor, I write the text to various records in the database depending on the content. I want to know if each text item is changed or not in order to set a date changed field for that particular database record (only when it really changes).

I know I can test if any text is modified in the Editor, but is there way to test if each text item was modified (or not) without saving the original text somewhere for comparison? That is, is the a property of a text item which indicates it was modified?

Thanks,
Phil
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

When a text item is edited, OnItemTextEdit event occurs.

See also the demo in Demos\*\Assorted\Fields\LiveLink\Tables\
It establishes a link between a text item and TEdit
(however, this demo does not use OnItemTextEdit event, it rescans the whole document on each change)
Last edited by Sergey Tkachenko on Sat Mar 19, 2011 4:07 pm, edited 1 time in total.
phorst
Posts: 2
Joined: Thu Mar 17, 2011 10:00 pm

Post by phorst »

Thanks for your reply. This will work.
Post Reply