Home > Net >  C # how to give continuous button controls the assignment of color?
C # how to give continuous button controls the assignment of color?

Time:04-14

64 a button control, the color of each control, according to the coming of digital is different, different colors, just two, green and red, which is 1 s and 0 s,
64 button, one by one to write, not want dead tired, how to use the loop to their assigned a color?

CodePudding user response:

Traverse a minute not to go, have Controls properties button in the form, is containing the control, according to type or name, when you traverse the tag attributes to judge whether the button you want, so treatment is ok

CodePudding user response:

Upstairs positive solution, traverse Controls with respect to ok

CodePudding user response:

These controls the textchanged event +=the same method
According to the sender as the button object to determine what color
  •  Tags:  
  • C#
  • Related