JVCL Help:TJvCustomRichEdit.FindText
JVCL Help: TJvCustomRichEdit.FindText Method
Search in JVCL Help
Search in all projectsSummary
Searches a given range in the text for a target string.
Pascal
functionFindText(constSearchStr: string; StartPos: Integer; Length: Integer; Options: TRichSearchTypes): Integer;
Parameters
Parameters | Description |
const SearchStr: string | Specifies the string to find. |
StartPos: Integer | Indicates the beginning of the range of text that should be searched, where 0 is the first character in the text. |
Length: Integer | Indicates the length of the text that should be searched. |
Options: TRichSearchTypes | Specifies the parameters of the search operation. |
Return Value
Returns the position of the search string, where 0 is the position of the first character in the rich edit control (as opposed to the first position n the search range). If the search string does not appear in the indicated range, FindText returns -1.
Description
Use FindText to search a range of text in the rich edit control for the string specified by the SearchStr parameter. Only the text in the range starting at the position StartPos and continuing through the next Length positions will be searched.
Use FindText rather than programmatically searching through the text of the control, to keep from being thrown off by the encoding of rich text characteristics.
Use Options to specify whether to
- Search only for whole words that match the search string.
- Perform a case-sensitive or case-insensitive search operation.
- Search backward or forward.
- Select the found text, and scroll it into view.
See Also
TJvCustomRichEdit.CanFindNext, TJvCustomRichEdit.FindDialog
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page