Changing multiple button-properties in a for-loop ?

From: Wolfgang (wolf_sch2003_at_yahoo.de)
Date: 11/17/04


Date: Wed, 17 Nov 2004 17:10:58 +0100

Dear all,

I've a lot of buttons named button1..button100 and want to change some of there propertys.
Maintaining the overview I'm looking for a possibility for something like:

System::Windows::Forms::Button * Wolfgang;

for (i=1;i<100;i++)
{
    Wolfgang = ???;
    Wolfgang->BackColor=Color::YellowGreen;
}

to avoid:

button1->BackColor = Color::YellowGreen;
button2->BackColor = Color::YellowGreen;
button3->BackColor = Color::YellowGreen;
...

But I don't know how to fill the gap ??? with code.

                                Many thanks for suggestions,

                                                        Wolfgang