Obtaining table if table is changed

General TRichView support forum. Please post your questions here
Post Reply
dschensky
Posts: 2
Joined: Sun Apr 16, 2006 6:26 pm

Obtaining table if table is changed

Post by dschensky »

Hi!

We try to implement a simple change tracking feature with TRichView by adding a red border to any modified paragraph.
We are using the OnItemAction event, but we have problems to obtain the table item if rows/columns are deleted.
What is the best way to obtain the table item in OnItemAction, if columns/rows are deleted?
Or maybe there is a better approach to implement a simple change tracking feature?

(our TRichView version is 12.6.1)

Hope you can help,
Jan
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

When a table row/column is deleted, this event is called with the ItemAction=rviaMovingToUndoList for all items in the deleted cells.

The item has RVData parameter.
If RVData.GetSourceRVData is TRVTableCellRVData, this item is in a cell. And you can get the table as (RVData.GetSourceRVData as TRVTableCellRVData).GetTable.

However, you cannot know the reason why this item is deleted. May be a cell/row is deleted, but may be this item is deleted because the user deleted a selection.
dschensky
Posts: 2
Joined: Sun Apr 16, 2006 6:26 pm

Post by dschensky »

Thanks alot!
Jan
Post Reply