如题目

解决方案 »

  1.   

    写错了。应该是如何得到多选的节点。放在数组或Tlist里。
      

  2.   

    ListView1的属性MultiSelect设置为true;var
      i:Integer;
      List:TList;
    begin
      List:=TList.Create;
      for i:=0 to ListView1.Items.Count-1 do
      begin
         if ListView1.Items[i].Selected then
         begin
             List.Add(ListView1.Items[i]); //添加到list里
         end;
      end;
      List.Free;
    end;
      

  3.   

    selections[]里存放的就是选择的节点列表
      

  4.   

    灵异事件?为什么我这里有?selections?
      

  5.   

    Selections property (TCustomTreeView)Returns nodes selected.Delphi syntax:property Selections[Index: Integer]: TTreeNode;C++ syntax:__property TTreeNode* Selections[int Index] = {read=GetSelection};DescriptionSelections returns one of selected nodes. The maximum value of Index is SelectionCount-1. If more than one node is selected, Selections[0] is the primary selected node. This node is the starting point for extended selections if MultiSelectStyle includes msShiftSelect.
      

  6.   

    var
      i:Integer;
    begin
      for i:=0 to TreeView1.SelectionCount-1 do  
      begin
       showmessage(TreeView1.Selections[i].Text); //在这里把值添加到list里
      end;
    end;