c# treeview 有复选框,但能不能不可选

2024-12-17 04:10:53
推荐回答(1个)
回答1:

private void treeView1_BeforeCheck(object sender, TreeViewCancelEventArgs e)
{
if (判断正确)
{
e.Cancel = true;
}
}