且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在TreeView中获取父节点和子节点的索引?

更新时间:2023-01-26 08:52:11

只需尝试一下....

Just try this....

int a = treeView1.SelectedNode.Parent.Index;
int b = treeView1.SelectedNode.FirstNode.Index;



问候
塞巴斯蒂安



Regards
Sebastian