내 문제는 특정 노드를 보이지 않게 설정할 수 있기를 원한다는 것입니다. 나는 두 가지 형태가있어. 두 번째 것은 첫 번째 형태의 노드와 동일한 이름의 마녀 체크 박스입니다. 체크 박스 중 하나를 체크 한 후,이 노드를 보이지 않게 첫 번째 형태로 만들고 싶습니다. 양식간에 데이터를 전달하는 것은 MessageBox로 테스트했기 때문에 작동합니다.특정 노드 보이지 않게하기
public static bool a;
public static bool b;
private void Categories()
{
if(a == true)
{
treeView1.Nodes[0].IsVisible = false;
}
}
오류 내가 얻을 : 노드가 포함 첫 번째 양식에서
private void button1_Click(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
Form1.a = true;
}
this.Close();
}
코드 : 두 번째 양식에서
코드 (Responslibe 보이지 않는 노드를 만들기위한)
Property or indexer 'System.Windows.Forms.TreeNode.IsVisible' cannot be assigned to -- it is read only
처럼 뭔가를 시도 할 수 있습니다 노드에게
을 제거하는 기능을 제거 할 수 있습니다. –
가능한 복제 http://stackoverflow.com/questions/1199417/how-do-i-make-a-treenode-not-visible-c –