TRichViewEdit - Checkpoints

General TRichView support forum. Please post your questions here
Post Reply
Graham
Posts: 64
Joined: Sun Jan 27, 2013 7:51 pm
Location: Berkshire U.K.

TRichViewEdit - Checkpoints

Post by Graham »

Two questions

Question 1:

So I can do this to add a checkpoint at the bottom of the current text:

s := InputDialog.Value;
rve.AddNamedCheckpointEx('C' + s, true);
rve.AddFmt('[' + s + '] ', [0], TEXT_STYLE, ARA_STYLE);
rve.Format;


But how do I "Insert" the checkpoint into some existing text e.g.

Before:

This is some text
More text

After:

This is some text
[1]
More text


Question 2:

After Inserting or adding the checkpoint how do I position the caret to the end of my newly added line? I want the caret after the ]. Is this possible?
Sergey Tkachenko
Site Admin
Posts: 17564
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Functions for checkpoints are listed here:
http://www.trichview.com/help/checkpoints_overview.html

If you want to assign a checkpoints when generating document, you can use SetCheckpointInfo method.

Note that checkpoints are not document items, so they do not occupy any screen space, they do not affect caret positions. They are properties of items (with the only exception - a checkpoint at the bottom of the document, not belonging to any item).
So, when you add/set a checkpoint, you simply assign it to some item, and it is assumed that this checkpoint is located at the top left corner of this item.

If you want to "insert" a checkpoint as an editing (undoable) operation, use either SetCheckpointInfoEd or InsertCheckpoint. Details can be found in the help file.
Post Reply