FindItem Method (JList)

Class

JList.

Action

Returns the index of an item in the list.

Syntax

C#
result = list.FindItem(itemText)
VB
result = list.FindItem(itemText)
Variable Description
result The index of the first matching item or -1 (4Test: 0) if no item was not found. The value is zero-based. Integer.
itemText The item to find. String.

Examples

VB

Dim index As Integer = ColorsList.FindItem("green")