Dev Treelist双击获取节点 ,通过FocusedNode获取不可靠

mac2024-08-19  60

通过Treelist的 CalcHitInfo 方法,返回结果TreeListHitInfo,里面Node即为点击到的节点。

private void TreeList1_MouseDoubleClick(object sender, MouseEventArgs e) { TreeListHitInfo hitInfo= treeList1.CalcHitInfo(e.Location); if (hitInfo.Node != null) { //hitInfo.Node即为点击到的节点,没有点击到节点的话hitInfo.Node为空 } }

 

最新回复(0)