procedure TForm1.ListBox1Click(Sender: TObject); begin Edit1.Text := ListBox1.Items[ListBox1.ItemIndex]; end;
procedure TForm1.ListBox1Click(Sender: TObject); begin Edit1.Text := ListBox1.Items.Strings[ListBox1.ItemIndex]; end;
procedure TForm1.ComboBox1Change(Sender: TObject); begin edit1.Text:=Combobox1.Text; end;
onclick里写,listbox的multiselect只为trueprocedure TForm1.ListBox1Click(Sender: TObject); var I:integer; begin for i:=0 to Listbox1.Items.Count-1 do begin if Listbox1.Selected[i]=true then begin edit1.Text:=ListBox1.Items[i]; end; end; end;
o 好多人啊~~ 热闹onclick里写,listbox的multiselect只为trueprocedure TForm1.ListBox1Click(Sender: TObject); var I:integer; begin for i:=0 to Listbox1.Items.Count-1 do begin if Listbox1.Selected[i]=true then begin edit1.Text:=ListBox1.Items[i]; end; end; end;
begin
Edit1.Text := ListBox1.Items[ListBox1.ItemIndex];
end;
begin
Edit1.Text := ListBox1.Items.Strings[ListBox1.ItemIndex];
end;
begin
edit1.Text:=Combobox1.Text;
end;
var
I:integer;
begin
for i:=0 to Listbox1.Items.Count-1 do
begin
if Listbox1.Selected[i]=true then
begin
edit1.Text:=ListBox1.Items[i];
end;
end;
end;
热闹onclick里写,listbox的multiselect只为trueprocedure TForm1.ListBox1Click(Sender: TObject);
var
I:integer;
begin
for i:=0 to Listbox1.Items.Count-1 do
begin
if Listbox1.Selected[i]=true then
begin
edit1.Text:=ListBox1.Items[i];
end;
end;
end;