rvico TRichView Reference | TRichView

TCustomRichView.GetTextInfo

Top  Previous  Next

Returns text and tag for the ItemNo-th item

procedure GetTextInfo(ItemNo: Integer; var AText: String;

  var ATag: Integer);

Input parameter:

ItemNo – index of the item. The item must be of text type (GetItemStyle must return zero or positive value for this item), otherwise the method raises ERichViewError exception. Items are indexed from 0 to ItemCount-1. Items of subdocuments (table cells) are not included in the items range of the main document; for items in cells, use Cell.GetRVData.GetTextInfo.

Output parameters:

AText – item text (visible text). See the Unicode note below.

ATag tag of the item.If tags are pointers to dynamically allocated strings (rvoTagsArePChars in Options), this procedure returns a pointer to this string (you can convert the returned ATag to PChar), not to the copy of it, so you should not free it. Use SetItemTag to change tag of item. The tag can also be returned by GetItemTag.

 

unicode Unicode note: Not recommended for Unicode applications. In Unicode applications, use GetItemTextA or GetItemTextW instead.

 

See also methods:

GetItemStyle;
GetItemText, SetItemText;
GetItemTag, SetItemTag.

See also properties:

ItemCount.

See also:

Obtaining items;
Item types;
"Tags".


RichView © Sergey Tkachenko