rvico TRichView Reference | TRichViewEdit

TRichViewEdit.InsertCheckpoint

Top  Previous  Next

Inserts checkpoint in the position of caret.

procedure InsertCheckpoint(const ATag: TRVTagconst AName: String;

 ARaiseEvent: Boolean);

(introduced in version 10)

This method is similar to SetCurrentCheckpointInfo, but inserts checkpoint exactly in the position of caret.

If the caret is at the beginning of item, this methods calls SetCheckpointInfoEd to add checkpoint for this item.

If the caret is at the middle of text item, this method splits this item at the position of caret, and calls SetCheckpointInfoEd to add checkpoint for the item to the right.

If the caret is at the end of paragraph, the method moves it to the beginning of the next paragraph, and calls SetCheckpointInfoEd to add checkpoint for the first paragraph item (or the second item, if the first one is list marker).

If the caret is at the end of document, this methods does nothing.

This method is used in conjunction with GetCheckpointAtCaret and RemoveCheckpointAtCaret (GetCurrentCheckpoint and RemoveCurrentCheckpoint cannot be used, because checkpoint added by this method is not necessary belongs to the current item (that is usually the item to the left of the caret).

Parameters.

ATagtag of checkpoint;

AName – name of the checkpoint, any string without line break (CR, LF) characters.

ARaiseEvent – "raise event" flag; if set, RichView can generate OnCheckpointVisible event for this checkpoint.

 

Method type: editstyle editing-style.

unicode Unicode note: names of checkpoints are Unicode strings for Delphi/C++Builder 2009 or newer, and ANSI strings for older versions of Delphi/C++Builder.

 

See also:

Modifying RichView items;

"Checkpoints";

"Tags".


TRichView © trichview.com