How to search for element in ListBox?

1

I need to look up words partially within a Listbox , eg one of the elements of Listbox has the word Dog , if I type cach (in an edit for example) it searches and selects all words that start with these letters.

    
asked by anonymous 25.04.2014 / 00:16

1 answer

2

I've solved people for whom I need, follow the complete code:

var
S : Array[0..255] of Char; 
begin
StrPCopy(S, Edit2.Text);
with ListBox1 do
ItemIndex := Perform(LB_SELECTSTRING, 0, LongInt(@S));
end;
    
25.04.2014 / 00:33