OverviewExamples
number ListBox.FindItem ( |
search_index = ListBox.FindItem("ListBox1", -1, 0, "Document");
Searches through all items in the "ListBox1" listbox object for the item text containing the string "Document." The variable "search_index" will store the index of the first item found.
dog_index = ListBox.FindItem("PictureShow", 5, 1, "Dog");
Starts searching at index 6 of the "PictureShow" listbox object for item data containing the string "Dog." If found, it's item index will be stored in the variable dog_index.
search_index = ListBox.FindItem("ListBox1", -1, LB_BYDATA, "*.txt");
Searches through all items in the "ListBox1" listbox object for item data containing any path string ending with .txt. Notice here that the wildcard "*" is used. If found, it's item index will be stored in the variable search_index.
See also: Related Actions