How to insert a checkpoint to a table row

General TRichView support forum. Please post your questions here
Post Reply
MPICARD
Posts: 3
Joined: Mon Jul 20, 2015 11:07 am

How to insert a checkpoint to a table row

Post by MPICARD »

I use TSRichViewEdit to develop a basic report editor with data bands.

I use the checkpoints to mark user Begin/End of bands (for example "#[ALLPAGES" and "#[ENDOFALLPAGES]") and I have adapt the source code to show this bands as colored borders block/section.

My technic to draw this blocks is the same of the standard drawing procedure of Header/Footer titles (ie. DrawShadingAndTitles).

So, I've add a new procedure "DrawActiveCheckpoints" to TSRichViewEdit and new properties to TRVCPInfo ("Color" and "Active").
When the mouse is over an item checkpoint I set the TRVCPInfo.Active property of the checkpoint to TRUE and I force TSRichViewEdit to redraw.

It works fine when checkpoints are linked to the main document RVData (ie. TSRichViewEdit).



Now, I need to apply the same technic for tables and table rows.
So, I need some focus on :
1- Is it possible to define Rows checkpoints ?
2- When I have an ItemNo, How can I know if this item is a table item reference ?
3- How I can extract the Main document RVData of a table cell (ie. Parent table RVData)?

Tanks for any contributors.
Sergey Tkachenko
Site Admin
Posts: 17571
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1. No, rows cannot have checkpoints. You can only add a checkpoint to an item inside a table cell.
2. If you know that the item is inside the main editor, you can check rv.GetItemStyle(ItemNo)=rvsTable, and if yes, get a table as TRVTableItemInfo(rv.GetItem(ItemNo)).
But table cells are documents themselves, they have their own items, some of them can be tables too.
3. Cell.GetAbsoluteParentData
Post Reply