Hello sergey
I did this code to create several checkpoints.
var
str : string;
Editor : TDBSRichViewEdit;
begin
PegaEditor(Editor); // get the active editor
str := Editor.RichViewEdit.GetSelTextW;
if str='' Then Begin
ShowMessage('No word to create checkpoint');
end else begin
if Editor.RichViewEdit.CanChange Then Begin
Editor.RichViewEdit.AddNamedCheckpoint(Str);
Editor.RichViewEdit.Format;
Qtextos.Post;
end;
CarregaCheckPoint; // procedure Load CheckPoints into a listbox
end;
I am having the following problem:
1) I can only create one checkpoint
2) My text isn't being save with checkpoint created.
Why?
Thanks
problem with checkpoint - add
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1) A checkpoint mark a position in the document. It cannot mark a selected fragment or any range of text.
2) AddNamedCheckpoint adds a checkpoint to the end of the document.
I recommend using InsertCheckpoint, GetCheckpointAtCaret, RemoveCheckpointAtCaret methods. They are editing methods, so you do not need CanChange, Format. Post is optional, if you want to save changes to DB immediately.
2) AddNamedCheckpoint adds a checkpoint to the end of the document.
I recommend using InsertCheckpoint, GetCheckpointAtCaret, RemoveCheckpointAtCaret methods. They are editing methods, so you do not need CanChange, Format. Post is optional, if you want to save changes to DB immediately.