rvico TRichView Reference | TRichViewEdit

TCustomRichViewEdit.GetCurrentTextInfo

Top  Previous  Next

Returns text and tag for text item at the position of caret

procedure GetCurrentTextInfo(var AText: Stringvar ATag: Integer);

It's recommended to use GetCurrentItemTextA and GetCurrentTag instead of this method.

GetCurrentTextInfo(...) is equivalent to TopLevelEditor.GetTextInfo(TopLevelEditor.CurItemNo, ...).

If tags are pointers to dynamically allocated strings (rvoTagsArePChars in Options), this method returns a pointer to this string (you can convert returned value to PChar), not to a copy of it, so you should not free it. Use SetCurrentTag to change tag of item at the caret position, as an editing operations.

 

This method must be called only when the document is formatted.

unicode Unicode note: Not recommended for Unicode applications. In Unicode applications, use GetCurrentItemTextA or GetCurrentItemTextW instead.

 

See also properties:

CurItemNo;
CurItemStyle.

See also:

Obtaining items;
Item types;
"Tags".


RichView © Sergey Tkachenko