就是将listbox的items的每行东西关联到edit里去
说的在简单点就是如果我随便点击listbox的哪一行
edit就显示哪一行的东西帮帮我吧!

解决方案 »

  1.   

    procedure TForm1.ListBox1Click(Sender: TObject);
    begin
      if ListBox1.Items.Count <> 0 then
        Edit1.Text := ListBox1.Items.Strings[ListBox1.ItemIndex];
    end;
      

  2.   

    Edit1.Text := ListBox1.Items.Strings[ListBox1.ItemIndex];
      

  3.   

    procedure TForm1.ListBox1Click(Sender: TObject);
    begin
      if ListBox1.Items.Count <> 0 then
        Edit1.Text := ListBox1.Items.Strings[ListBox1.ItemIndex];
    end;