cxTreeList交换当前两个节点的的位置

有时候因为需要交换两个节点的位置,用了很多方法,效果都不是很理想,经过多次测试,发现一个方法能达到很好的效果,如下:

AcxTreeListColumn.AddNode(AcxTreeListColumn.FocusedNode.GetNext, AcxTreeListColumn.FocusedNode, nil, tlamInsert);

这个是将当前选中的节点移到前选中的节点的一下位置,也就是节点下移

AcxTreeListColumn.AddNode(AcxTreeListColumn.FocusedNode, AcxTreeListColumn.FocusedNode.GetPrev, nil, tlamInsert);

这个是将当前选中的节点移到前选中的节点的上一位置,也就是节点上移

注意上面参数的区别,第一个函数是将选中的节点(FocusedNode)作为第二个参数

第二个函数是将选中的节点(FocusedNode)作为第一个参数,这样以达到上、下称动的效果

posted on 2011-08-01 09:27  stwo  阅读(1396)  评论(0编辑  收藏  举报