Navigation:  thinBasic Modules > UI (User Interface) > Dedicated Control Functions > ListView Control > ListView: Items functions >

ListView_FindExact

Previous pageReturn to chapter overviewNext page

 

Description

 

Search in the first column of a ListView the first item which exactly matches with the indicated search text.

 

Syntax

 

nIdx = ListView_FindExact(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 exactly matches the data in sTextToFind.
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