![]() |
(SST) ShlWAPIFunctionInfo Version 1.0 |
---|---|
Developer Reference |
Searches a TSSTAdvancedListView's TListItems' captions for the specified text. |
Scope |
---|
Public (i.e. this method can be referenced from any code, including that in other units, with access to the TSSTAdvancedListView object of interest). |
Syntax | |
---|---|
Function FindText(atexttofind : STRING; srchoptions : TSSTBasicTextSearchOptions; VAR aposfoundat : INTEGER) : INTEGER; |
Parameters | |
---|---|
atexttofind [in] | A string containing the text to search for. |
srchoptions [in] | A record/structure of type TSSTBasicTextSearchOptions that specifies whether to restrict the search to whole words, perform a case-sensitive search, and in which direction to search. |
aposfoundat [out] | 0-based index of the first character of the text to find, within the TListItem caption, in which the search text was located. |
Return Values |
---|
If the function was able to find the search text, it returns the index of the TListItem in which the text was found. If none of the TListView's item captions contain the specified text or the function was passed an invalid parameter (e.g. an empty string), it returns -1. |
Remarks |
---|
The WholeWordsOnly member/field of the srchoptions parameter is ignored. |
Depending on whether the SearchDirIsDown member/field of the srchoptions parameter is TRUE or FALSE, the first caption searched is either that of the item preceding (SearchDirIsDown is FALSE) or following (SearchDirIsDown is TRUE) the item that is focused at the time of the call. |
Remark 1. |
Remark 2. |
Example |
---|
Sample code |
Requirements | |
---|---|
Unit | (Declared and implemented in) SSTNewUnit.pas |
Library | SSTNewUnit.dcu/SSTNewUnit.obj |
Unicode | Implemented as ANSI version only. |
See Also |
---|
TSSTAdvancedListView, Methods, GetNextNewFunctionName. |
Windows APIs: ListView_FindItem. |
Document/Contents version 1.00 Page/URI last updated on April 30, 2022 |
Copyright © Stoelzel Software Technologie (SST) 2010 - 2017 |
Suggestions and comments mail to: webmaster@stoelzelsoftwaretech.com |