Hi,
I need help with Checkboxes.
I set up a C# Form with 40 Checkboxes.
Now I need to step through them one by one to see if one is checked or not.
Later I want to write down something like:
1-20, 22, 24, 28-35, 37 are checked.
Can you help me?
I named the Checkboxes : cb_01 - cb_40
Currently I am trying to do something like
But does not work, because the controls seem to be mixed up.
What can I do?
I need help with Checkboxes.
I set up a C# Form with 40 Checkboxes.
Now I need to step through them one by one to see if one is checked or not.
Later I want to write down something like:
1-20, 22, 24, 28-35, 37 are checked.
Can you help me?
I named the Checkboxes : cb_01 - cb_40
Currently I am trying to do something like
Code:
for (int i = 1; i < 40; i++)
{
string sNr = "cb_" + i.ToString();
if (Controls[i].Name == sNr)
{
...
}
l_dbTest.Text = ...
}
What can I do?