TCustomRichViewEdit.CurItemNo (read-only)

<< Click to display table of contents >>

TCustomRichViewEdit.CurItemNo (read-only)

Index of item at the position of caret

property CurItemNo: Integer;

This value is in range from 0 to ItemCount-1.

If the caret is inside table cell, this property returns index of the table in the main document. Items of subdocuments (table cells) are not included in the items range of the main document. If you want to know index of item at the position of caret in the table cell, use TopLevelEditor.CurItemNo.

This property must be accessed only when the document is formatted.

When called for an empty editor (i.e. ItemCount=0), the method returns -1.

If you want to get the caret position as a number of characters from the beginning of the document, use RVGetCaretPos from RVLinear unit instead.

See also properties:






See also events:


See also:

Inserting in the position of the caret;

How to: move the caret to the beginning or to the end of document in TRichViewEdit.