Zum Inhalt

SearchListBoxItem (Opus Funktion)

Beschreibung

Searches a list box for an item whose text matches Text and returns its index.

Argumente

Name

Typ

Beschreibung

hWnd

integer Handle

Handle auf das Fenster

Text

string

String im Listbox Element
item text to search for. The whole item text has to match, but the comparison is not case sensitive.

StartIndex

integer

Startindex des Elementes
zero-based index of the item BEFORE the first item that is searched, so 0 starts the search at item 1. Pass -1 to search the whole list starting at item 0. The search wraps around at the end of the list and stops when it comes back to StartIndex, so every item is looked at exactly once.

Rückgabewert integer

Index des gefundenen Elementes zero-based index of the first matching item, or -1 if no item matches. If hWnd is not a valid window handle no search is carried out and the returned value is undefined, so check the handle before calling.

Beispiel

xxx

Siehe auch