How to search for element in Listbox?

Asked

Viewed 754 times

1

I need to search for words partially inside a Listbox, example: one of the elements of Listbox has the floor Dog, if I type cach (in an Edit for example) it searches and selects all words that start with those letters.

1 answer

2


I’ve already solved personnel for those who need, follow the full code:

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.