using DevExpress.XtraTreeList; using DevExpress.XtraTreeList.Nodes; private void treeList1_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { TreeListNode dragNode, targetNode; TreeList tl = sender as TreeList; Point p = tl.PointToClient(new Point(e.X, e.Y)); dragNode = e.Data.GetData(typeof(TreeListNode)) as TreeListNode; targetNode = tl.CalcHitInfo(p).Node; tl.SetNodeIndex(dragNode, tl.GetNodeIndex(targetNode)); e.Effect = DragDropEffects.None; }
使用的时候容易忘记,留作备用。
时间: 2024-10-08 09:52:15