J
Jan Smith
I have a C# project that has a tab control with four tab pages. On each tab
page is a set of three radio buttons (named radioButton1 through
radioButton12). I would like to loop through the radio buttons and set
their state without having to form the complete name of each one, something
like this:
public static void SetButtonState(Form frm, int ButtonCount)
{
for (int i = 0; i < ButtonCount; i++)
{
frm.radioButton.Checked = true;
}
}
How can address each radio button without having to form its complete name,
which would require 11 extra lines of code?
Thanks for any help.
page is a set of three radio buttons (named radioButton1 through
radioButton12). I would like to loop through the radio buttons and set
their state without having to form the complete name of each one, something
like this:
public static void SetButtonState(Form frm, int ButtonCount)
{
for (int i = 0; i < ButtonCount; i++)
{
frm.radioButton.Checked = true;
}
}
How can address each radio button without having to form its complete name,
which would require 11 extra lines of code?
Thanks for any help.