TPlusMemo.FindTxt
PlusMemo Help Send comments on this topic.
TPlusMemo.FindTxt

Glossary Item Box

 

Applies to

TPlusMemo, TDBPlusMemo

 

Declaration (Delphi)

function  FindTxt(const Text: string;

                   GoForward, 

                   MatchCase, 

                   WholeWordsOnly,

                   Global        : Boolean): Boolean;

 

Description

This method searches the content of the TPlusMemo or TDBPlusMemo, starting from the current editing position (if parameter Global is False), and stops on the first occurrence of TextGoForward is used to specify the search direction and MatchCase indicates whether the search should consider uppercase and lowercase characters as different.  Parameter WholeWordsOnly controls whether the text should be surrounded by delimiters to be considered a match.  The delimiters used for this search are those specified by properties Delimiters or Separators.

 

If Global is True, the search starts from the beginning of the memo (if GoForward is True) or at the end (if GoForward is False).  The search will stop at the first occurrence of Text, if any.

 

If the search is successful, the selection will be put on the found occurrence of Text and the function result will be True.  If the search is not successful, the selection is not moved and the result will be False.

 

Parameter Text should not contain any combination of carriage return (#13) or line feed (#10) characters as the text-matching algorithm does not cross paragraph boundaries.