Hi Boki,
I was using an TRzComboBox and replaced it with a TNxComboBox.
Is the SearchFor method the equivalent of the IndexOf method?
It doesn't seem to find the text I'm looking for, ie. it returns -1.
Thanks.
= Steve
Posted 10 April 2021 - 03:25 AM
Hi Boki,
I was using an TRzComboBox and replaced it with a TNxComboBox.
Is the SearchFor method the equivalent of the IndexOf method?
It doesn't seem to find the text I'm looking for, ie. it returns -1.
Thanks.
= Steve
Posted 10 April 2021 - 04:04 AM
Hi Boki,
I ended up just writing a method.
cmbClient.ItemIndex := GetClientItemIndex(Client); function TfrmAppointment.GetClientItemIndex(AClientName: string): integer; var i: integer; begin Result := -1; for i := 0 to cmbClient.Items.Count - 1 do begin if SameText(cmbClient.Items[i], AClientName) then begin Result := i; Break; end; end; end;
= Steve
Posted 12 April 2021 - 10:35 AM
Hi Steve,
Sorry for delay. I will think about adding similar method to be built in the component.
0 members, 1 guests, 0 anonymous users