zoukankan      html  css  js  c++  java
  • ListView添加项目带序列

    ListView添加项目带序列
     
     
    function AddSelItems(listview1:TListView;ListView2:TListView):Boolean;
    var
      s: string;
      I,j: Integer;
    begin
      Result:=False;
      if listview1.Selected =nil then  exit;
     
      for i := 0 to listview1.items.count - 1 do
      begin
         j:=ListView2.Items.Count;
        if listview1.items[i].selected then
     
          with ListView2.Items.Add do
          begin
            Caption:=IntToStr(j);
            SubItems.add( listView1.Items[i].Caption );
            SubItems.add('FileName2');
          end;
      end;
      Result:=True;
    end;
     
     
    procedure TForm1.Button1Click(Sender: TObject);
    begin
       AddSelItems(ListView1,ListVIew2);
    end;




    附件列表

    • 相关阅读:
      C#
      C#
      css
      css
      css
      css
      css
      Css
      Javascript
      ASP.NET MVC
    • 原文地址:https://www.cnblogs.com/xe2011/p/3876254.html
    Copyright © 2011-2022 走看看