rvico TRichView Reference | TRichView

TCustomRichView.GetItemText, GetItemTextA, GetItemTextW

Top  Previous  Next

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

function GetItemText(ItemNo: Integer): String;

function GetItemTextA(ItemNo: Integer): String;

function GetItemTextW(ItemNo: Integer): WideString;

(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 note: GetItemText is not recommended for Unicode applications. GetItemTextA and GetItemTextW are recommended for Unicode applications.

GetItemTextA always returns ANSI string:

If the item is a non-text item, or a text item of ANSI style, the text is returned as it is.
If the item is a Unicode text item, the function converts Unicode text to ANSI (Unicode text is converted basing on Charset of the item text style).

GetItemTextW always returns Unicode string:

If the item is a Unicode text item, the text is returned as it is.
If the item is a non-text item, or a text item of ANSI style, the function converts ANSI text to Unicode (ANSI text is converted basing on Charset of the item text style, or on RVStyle.DefCodePage for non-text items).

GetItemText: the item text is returned as it is (for Unicode text items, it returns "raw Unicode text"), without conversion, be careful.

 

See also:

SetItemText -A -W.

See also method of TRichViewEdit:

GetCurrentItemText -A -W.

See also:

Obtaining Items of RichView;
Unicode in RichView.


RichView © Sergey Tkachenko