treeList设置焦点方法:
this.treeList1.Focus();//当前编辑的单元格光标消失;
treeList取消编辑方法:
this.treeList1.CancelCurrentEdit();
//总结:根据什么依据不能编辑,就论自己的情况而定,ShowingEditor 是显示编辑,如果取消编辑为真
//e.Cancel = true; //就是不允许编辑
private void treeList1_ShowingEditor(object sender, System.ComponentModel.CancelEventArgs e)
{
if (this.treeList1.FocusedNode.Level == 0)
{
e.Cancel = true;
}
}
爱站程序员基地
![(原创)[C#] 一步一步自定义拖拽(Drag&Drop)时的鼠标效果:(一)基本原理及基本实现-爱站程序员基地](https://aiznh.com/wp-content/uploads/2022/07/20220721231016-62d9dcd85c40b-220x150.gif)

