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
Obtaining table if table is changed
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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.
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.