Changing multiple button-properties in a for-loop ?
From: Wolfgang (wolf_sch2003_at_yahoo.de)
Date: 11/17/04
- Next message: Jeff F: "Re: templates, C++, and LNK2019"
- Previous message: Bo Persson: "Re: templates, C++, and LNK2019"
- Next in thread: Steve McLellan: "Re: Changing multiple button-properties in a for-loop ?"
- Reply: Steve McLellan: "Re: Changing multiple button-properties in a for-loop ?"
- Reply: Tom Widmer: "Re: Changing multiple button-properties in a for-loop ?"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Jeff F: "Re: templates, C++, and LNK2019"
- Previous message: Bo Persson: "Re: templates, C++, and LNK2019"
- Next in thread: Steve McLellan: "Re: Changing multiple button-properties in a for-loop ?"
- Reply: Steve McLellan: "Re: Changing multiple button-properties in a for-loop ?"
- Reply: Tom Widmer: "Re: Changing multiple button-properties in a for-loop ?"
- Messages sorted by: [ date ] [ thread ]