Вот такой код:
var
l: Word;
--
if text <> '' then
begin
with ListBox1 do
begin
l:= ListBox1.Perform(LB_SELECTSTRING, ItemIndex, LongInt(text));
end;
if ListBox1.Selected[l] then
begin
Memo1.Lines.Add(ListBox1.Items[ListBox1.ItemIndex]);
end
else
MessageDlg('Ничего не найдено!', mtInformation, [mbOk], 0)
end
else
Exit;
end;
выдаёт ошибку: List index out of bounds
|