lundi 14 août 2017

How do I check the checkbox programmatically in c# winform?

I have dynamically created checkboxes in my winform. Now I want to update the check mark in these checkboxes. How do I do that? I have only the

checkbox.Name

property to check mark the checkbox. I have used

foreach (CheckBox box in chboxes)
 box.Checked = true; 

where boxes is a List type and dynamically created checkboxes have been added to boxes.

chboxes.Add(chkbox);




Aucun commentaire:

Enregistrer un commentaire