listbox1.Items.Strings[listbox1.ItemIndex];

解决方案 »

  1.   

    for i:= 0 to ListBox1.Items.count - 1 do 
      if ListBox1.Items[i].selected then edit1.text := ListBox1.Items[i];
      

  2.   

    procedure TForm1.ListBox1Click(Sender: TObject);
    begin
      try
        Edit1.Text := ListBox1.Items.Strings[ListBox1.ItemIndex];
      except
      end;
    end;
      

  3.   

    s:=ListBox1.Items[ListBox1.ItemIndex];
      

  4.   

    procedure TForm1.ListBox1Click(Sender: TObject);
    begin
        Edit1.Text := ListBox1.Items.Strings[ListBox1.ItemIndex];
     end;上面那位,应该可以不用try函数吧?!
      

  5.   

    最好改成下面的代码:
      If ListBox1.ItemIndex<>-1 Then
        Edit1.Text:=ListBox1.Items.Strings[ListBox1.ItemIndex];