Home > Net >  Winform, groupbox unified set the text color
Winform, groupbox unified set the text color

Time:03-29

All words to groupbox unified set colors, the zha get?

CodePudding user response:

 Color new_color=Color. FromArgb (new Random (Environment. TickCount.) Next ()); 
GroupBox1. Controls. Cast ToList () (). The ForEach (c=& gt; C.F oreColor=new_color);
GroupBox1. ForeColor=new_color;

CodePudding user response:

Using a recursive set of controls ForeColor
  •  Tags:  
  • C#