Partager via


LISTBOX.findItem

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The findItem method searches for a given string starting with the item following the specified item index.

        elementID.findItem(startIndex, searchString)

Parameters

startIndex

Number (long) containing the index of the item at which to start the search.

searchString

String containing the text to search for.

Return Value

This method returns a Number (long) containing the index of the item that contains the string.

Remarks

To start the search at the first line of the list box control, use 1 as the startIndex. To continue to search for text after the first line is found, use the returned line index as the startIndex, and the search will start at the next line. This method will search for substrings and is not case-sensitive.

Requirements

Requirement Value
Version
Windows Media Player for Windows XP or later

See also

LISTBOX Element