findStringExact
findStringExact(startIndx: Integer; str: String): Integer;
The findStringExact method of the ListBox class or ComboBox class searches the entries in a list box or combo box control for an entry with the string specified in the str parameter.
The search is not case-dependent. The findStringExact method matches only entries where the strings are an exact match.
The search starts with the value specified in the startIndx parameter and returns the next found entry in the list. If no matching entry is located, it returns -1.
The method in the following example shows the use of the findStringExact method.
vars custs : CustomersByContactNameDict; cust : Customers; begin app.mousePointer := MousePointer_HourGlass; comboBoxCity.addItem("[All Cities]"); create custs; foreach cust in custs do listBoxCustomers.addItem (cust.contactName & ", " & cust.address); if comboBoxCity.findStringExact (1, cust.city) = -1 then comboBoxCity.addItem (cust.city); endif; endforeach; epilog app.mousePointer := MousePointer_Default; end;