其实它有一个属性
MultiSelect :=True;
即可多选

解决方案 »

  1.   

    各位误会了。我的意思是如何用for循环把选中的所有行的值取出来
      

  2.   

    var
        i:  integer;
    begin
        Caption:='';
        for i:= 0 to ListView1.Items.Count-1 do
        Caption:=Caption+ListView1.Items[i].Caption;
    end;
      

  3.   

    孤星兄,这段代码是取出listview的所有行,我要的是取出选中的行,还有没有高招啊?
      

  4.   

    for iCount:=0 to ListView.ItemCount-1 do
       begin
       if ListView.Items[iCount].Selected then
          begin
          iCount+1就是行号
          end;
       end;
      

  5.   

    for iCount:=0 to ListView.ItemCount-1 do
      begin
      if ListView.Items[iCount].Selected then
        begin
        iCount+1就是选中的行号
        end; 
      end;
      

  6.   

    对不起,把最重要的忘了,呵呵
    var
        i:  integer;
    begin
        Caption:='';
        for i:= 0 to ListView1.Items.Count-1 do
        if ListView1.items[i].selected then
        Caption:=Caption+ListView1.Items[i].Caption;
    end;
      

  7.   

    var
        i:  integer;
    begin
        Caption:='';
        for i:= 0 to ListView1.Items.Count-1 do
        if ListView1.items[i].selected then
        Caption:=Caption+ListView1.Items[i].Caption;
    end;