GetIndex

[method icon] GetIndex(iIndex)

Used to test drop down index numbers for validity

iIndex Integer

Returns result of type Index

Applies to: ComboBox , Grid , GridCell , KCMLEdit , List Box


[method icon] GetIndex(sSearch$)

Used to return the index number associated with the specified string

sSearch$ String

Returns result of type Index

Applies to: ComboBox , Grid , GridCell , KCMLEdit , List Box


>GetIndex

GetIndex

When passed a string this method can be used to return the index number associated with the matching tag.If there is no tag associated with an entry its value will be checked instead. The Add()) method supports adding strings with or without tags. For example:

 Ind = .EditControl1.GetIndex(item$)

The method will return -1 if passed a string that did not exist in the list.

When passed an index number this method can be used to test index numbers for validity. If the specified index number no longer exists, i.e. the entry has been deleted, then a value of -1 is returned. For example:

 IF (.EditControl1.GetIndex(Position) = -1)
 ...
 END IF

See also

ComboBox methods, properties and events. Grid methods, properties and events. GridCell methods, properties and events. KCMLEdit methods, properties and events. List Box methods, properties and events.