返回ListBox选中的多项目

//返回ListBox选中的多项目
procedure TForm1.Button2Click(Sender: TObject);
var
i:Integer;
s:string;
begin
   for i:=0 to ListBox1.Items.Count-1 do
   if ListBox1.Selected[i] then
      s:=s+ListBox1.Items[i]+#13#10;
 
   showmessage(s);
end;
 
 
 




posted @ 2014-07-29 18:44  XE2011  阅读(261)  评论(0编辑  收藏  举报