ListView_Find

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > CONTROLS > Control Types > ListView Control > Listview Control Commands > ListView: Items functions >

ListView_Find

 

Description

 

Search in the first column of a ListView the first item starting with the indicated search text.

 

Syntax

 

nIdx = ListView_Find(hWnd, ctrlID, StartRow, sTextToFind)

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

hWnd

Number

No

Handle of the dialog containing the list-view control

ctrlID

Number

No

Control identifier assigned to the control during CONTROL ADD ...

StartRow

Number

No

Row index to start from. Starts from 1

sTextToFind

String

No

A string containing the text to search for

 

Remarks

 

Strings in the first column of a ListView are searched to find the first string which begins with the data in sTextToFind, regardless of any characters which follow.
Comparisons are not case-sensitive.
Strings are searched beginning with the string specified by StartRow, and ending with the last string in the ListView.

Searching does not wrap to the beginning of the list.

The row number is indexed to 1 (1=first, 2=second, etc.).

To search the entire ListView starting with the first string, StartRow should be set to 1.

If no match is found, the value zero is returned.

 

Restrictions

 

See also

 

Examples