Home > Net >  C # rectangleShape control related issues
C # rectangleShape control related issues

Time:03-04

Bosses, ask a question, that has many rectangleShape c # form controls, named rectangleShape1 ~ rectangleShape50, want to determine change control color in the loop, but rectangleShape don't belong to the system control, can't use the following method int I=1; Controls [r]. "rectangleShape" + I BackColor=Color. Lime;
But can be used for system control, such as int I=1; Controls [r]. "label" + I Text="a";
Please support a move bosses

CodePudding user response:

Use this control
But now that cannot be obtained directly from the form at the
You build a List
Prior to all rectangleShape add
After traversing the list

CodePudding user response:

Can you name a look
  •  Tags:  
  • C#
  • Related