Skip to main content

TcxCustomRichEdit.FindTexT(string,Integer,Integer,TSearchTypes,Boolean) Method

Searches for the string in the specified range of text.

Declaration

function FindTexT(const ASearchStr: string; AStartPos: Integer; ALength: Integer; AOptions: TSearchTypes; AForward: Boolean = True): Integer;

Parameters

Name Type
ASearchStr string
AStartPos Integer
ALength Integer
AOptions TSearchTypes
AForward Boolean

Returns

Type
Integer

Remarks

If the match was found, the FindText method returns the zero-based position of the string’s first character. Otherwise, the method returns -1.

ASearchStr specifies the string to search.

AStartPos and ALength specify the search bounds.

AOptions specifies the search settings.

AForward specifies the search direction. Set AForward to True, to search forward. Otherwise, a backward search is performed. Note that AForward is in effect if the rich edit control v2.0 or later is used. In the rich edit control v1.0, the method always searches forward (AForward is ignored).

See Also