1、在panel中遍历某一个类型的控件 foreach(Control c in panel1.Controls) { if(c is checkBox) { // Yes.You can do another thing if you want. ((CheckBox)c).Checked = true; } } 2、向控件添加右键菜单过程 工程案例中,有些控件如dataGridView、panel等是需要在运行过程中进行数据、控件的清空或...【阅读全文】
1、在panel中遍历某一个类型的控件 foreach(Control c in panel1.Controls) { if(c is checkBox) { // Yes.You can do another thing if you want. ((CheckBox)c).Checked = true; } } 2、向控件添加右键菜单过程 工程案例中,有些控件如dataGridView、panel等是需要在运行过程中进行数据、控件的清空或...【阅读全文】