
03.09.2013, 10:03
|
Прохожий
|
|
Регистрация: 16.06.2013
Сообщения: 29
Версия Delphi: Delphi XE 2
Репутация: 10
|
|
Цитата:
Сообщение от Erilar
Как найти понял, А как можно теперь, чтобы он выделил эту строку?
Код:
var
i: integer;
Find: string;
begin
Find := Edit.text;
for i := 0 to LBox.Items.Count - 1 do
if Pos(Find, LBox.Items.Strings[i]) <> 0
then showmessage('Нашел!');
|
Код:
procedure TForm1.Button1Click(Sender: TObject);
begin
ListBox1.Items.Add('1');
ListBox1.Items.Add('2');
{This will fail on a single selection ListBox}
// ListBox1.Selected[1] := true;
ListBox1.ItemIndex := 1; {This is ok}
end;
|