TCustomRichView.GetItemText, GetItemTextA, GetItemTextW

<< Click to display table of contents >>

TCustomRichView.GetItemText, GetItemTextA, GetItemTextW

Returns a text of text item, or a name of non-text item.

function GetItemText(ItemNo: Integer): String;

function GetItemTextA(ItemNo: Integer): TRVAnsiString;

function GetItemTextW(ItemNo: Integer): TRVUnicodeString;

(Introduced in version 1.3, 1.7)

ItemNo index of the item. Items of subdocuments (table cells) are not included in the items range of the main document; for items in cells, use Cell.GetRVData.GetItemText*.

unicode Unicode notes:

Internally, text is stored as Unicode. GetItemTextA converts Unicode to ANSI. For a text item, a code page for conversion is calculated basing on the its Charset. If it is equal to DEFAULT_CHARSET, and for non-text items, Style.DefCodePage is used.

GetItemText returns:

ANSI string, like GetItemTextA, in Delphi 2007 and older

Unicode (UTF-16) string, like GetItemTextW, in Delphi 2009 and newer

Unicode (UTF-8) string, in Lazarus

 

See also:

SetItemText -A -W.

See also method of TRichViewEdit:

GetCurrentItemText -A -W.

See also:

Obtaining Items of RichView;

Unicode in RichView.