-2
The following code only works if you type the full string, I would like to modify the code to also focus on the listbox when part of the text is typed autocomplete style
procedure Tform1.Edit1Change(Sender: TObject);
var
i: Integer;
begin
i := ListBox1.Items.IndexOf(Edit1.Text);
if i>= 0 then
begin
ListBox1.ItemIndex:= ListBox1.Items.IndexOf(Edit1.Text);
end;
end;
Good evening.. I think the same way as Jmslasher :)
– Ricardo M.Souza
saw an interesting answer about this in another post, not tested, but seems to use Windows API: https://answall.com/questions/13929/como-procurar-elemento-em-listbox?rq=1
– JMSlasher