function AddNode(Node, Relative: TTreeNode; const S: string; Ptr: Pointer; Method: TNodeAttachMode): TTreeNode
那位朋友能详细介绍一下AddNode的说明

解决方案 »

  1.   

    还是用指针好了
    用AddObject
    DELPHI中有帮助
      

  2.   

    function AddNode(Node, Relative: TTreeNode; const S: string; Ptr: Pointer; Method: TNodeAttachMode): TTreeNode;
         
         Description
         描述:
         
         AddNode adds a node object to the collection. AddNode returns the newly-added node, and takes the following parameters.
         函数AddNode增加一个node到TreeNodes, 返回新增的node, 需要以下的参数:
         
         Node is the node object to be added. If Node is nil, then the tree view's CreateNode method is called to provide one.
         参数Node是被增加的函数,如果Node是nil,TreeView会自动创建一个
         
         The Relative and Method parameters together define the location of the new node. Relative is an existing node that will be either parent or sibling to the new node. Method specifies the precise relationship between the new node and relative, as given by a TNodeAttachMode constant.
         参数Relative和Method一起指定了新节点的位置,其中Relative(亲戚节点)是已经存在的节点,它将成为新节点的父节点或者兄弟节点;Method进一步确定新节点和Relative的关系,由类型为TNodeAttachMode的常数确定。
         
         The S parameter specifies the Text property of the new node.
         参数S指定新节点的Text属性
         
         The Ptr parameter specifies the Data property value of the new node. 
         参数Ptr指定新节点的Data属性
         
      

  3.   

    function AddObject(Node: TTreeNode; const S: string; Ptr: Pointer): TTreeNode;
    function Add(Node: TTreeNode; const S: string): TTreeNode;
    也可以的