Functions from RVGetText and RVGetTextW Units

<< Click to display table of contents >>

Functions from RVGetText and RVGetTextW Units

The units RVGetText and RVGetTextW include the identical sets of functions returning text from TRichView.

Functions from RVGetText return ANSI strings, functions from RVGetTextW return Unicode strings.

Unit [VCL/FMX]: RVGetText / fmxRVGetText:

function GetCurrentLineText(rve: TCustomRichViewEdit

  CodePage: TRVCodePage = CP_ACP): TRVAnsiString;

function GetVisibleText(rv: TCustomRichView

  CodePage: TRVCodePage = CP_ACP): TRVAnsiString;

function GetAllText(rv: TCustomRichView;

  CodePage: TRVCodePage = CP_ACP): TRVAnsiString;

function GetRVDataText(RVData: TCustomRVData;

  CodePage: TRVCodePage = CP_ACP): TRVAnsiString;

function GetCurrentParaSectionText(rve: TCustomRichViewEdit;

  CodePage: TRVCodePage = CP_ACP): TRVAnsiString;

function GetCurrentParaText(rve: TCustomRichViewEdit;

  CodePage: TRVCodePage = CP_ACP): TRVAnsiString;

function GetCurrentChar(rve: TCustomRichViewEdit;

  CodePage: TRVCodePage = CP_ACP): TRVAnsiString;

function GetCurrentWord(rve: TCustomRichViewEdit;

  CodePage: TRVCodePage = CP_ACP): TRVAnsiString;

Unit [VCL/FMX] RVGetTextW / fmxRVGetTextW:

function GetCurrentLineText(rve: TCustomRichViewEdit

  ForANSI: Boolean = False): TRVUnicodeString;

function GetVisibleText(rv: TCustomRichView

  ForANSI: Boolean = False): TRVUnicodeString;

function GetAllText(rv: TCustomRichView

  ForANSI: Boolean = False): TRVUnicodeString;

function GetRVDataText(RVData: TCustomRVData

  ForANSI: Boolean = False): TRVUnicodeString;

function GetCurrentParaSectionText(rve: TCustomRichViewEdit

  ForANSI: Boolean = False): TRVUnicodeString;

function GetCurrentParaText(rve: TCustomRichViewEdit

  ForANSI: Boolean = False): TRVUnicodeString;

function GetCurrentChar(rve: TCustomRichViewEdit): TRVUnicodeString;

function GetCurrentWord(rve: TCustomRichViewEdit): TRVUnicodeString;

(changed in version 18)

GetCurrentLineText returns the current line of text (the line containing the caret).

GetAllText returns all text in rv, GetRVDataText returns all text in RVData.

GetCurrentParaSectionText returns text of the paragraph section with the caret (paragraph section is a part of document limited either by paragraph breaks or by new line breaks (added with  Shift + Enter ).

GetCurrentParaText returns text of the paragraph with the caret.

GetCurrentChar returns character to the left of the caret. If the caret is at the beginning of line, returns the character to the right. If no character, returns empty string. Length of returned string may be more than 1, if several characters compose a single glyph.

GetCurrentWord returns the word with the caret.

 

For non-text items, these function return their text representation.

 

ANSI versions of the functions have an optional CodePage parameter. It is used to convert internal Unicode text representation to ANSI. Internally, all ANSI functions call the corresponding Unicode function and convert result to Unicode.

Unicode versions of the functions have an optional ForANSI parameter. Use the default value (False). ANSI functions call Unicode functions passing True to this parameter. In this mode, some items may return simplified versions of their text, avoiding characters that cannot be converted to ANSI.

See also:

RVGetTextRange