procedure TForm1.Button1Click(Sender: TObject); begin if ListBox1.ItemIndex <> - 1 then Edit1.Text := ListBox1.Items[ListBox1.ItemIndex]; end;