1. Implement the function to obtain the selected node, add the node under the selected node, fold, expand, and delete it, and get the checked item under the selected node. The node under the selected root node is also selected, and the icon is also selected.
Ii. Related code
btn_nodeText_Click(= ; MessageBox.Show(treeView1.SelectedNode.Text); btn_addNode_Click( (treeView1.SelectedNode != ) treeView1.ExpandAll(); Form1_Load(= ; treeView1.ExpandAll(); treeView1.CheckBoxes = ; treeView1.Nodes[].Nodes[].SelectedImageIndex = ].Nodes[].ImageIndex = btn_ExpandAll_Click( btn_CollapseAll_Click( btn_expandNow_Click( (treeView1.SelectedNode != btn_CollapseNow_Click( (treeView1.SelectedNode != btn_nodeDelete_Click( treeView1.Nodes[].Nodes[].Remove(); btn_deleteSelectNode_Click( (treeView1.SelectedNode != btn_showChecked_Click( str = (treeView1.SelectedNode != (TreeNode tn (tn.Checked == += treeView1_AfterCheck( sender, TreeViewEventArgs e) (TreeNode tn = e.Node.Checked;