Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Color
Hello,
 
I am working on windows application. In that I want to change color of all labels at runtime on all forms. I have done code which change color of labels. But need to do same code for each label. Is there any solution. Please tell me how to do it.
 
Thanks.
Posted 28-May-12 23:05pm
Comments
db7uk at 29-May-12 4:09am
   
winforms, wpf?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Supposing you are working with Windows Forms, then you may iterate over all controls and apply your logic to all the found labels. See, for instance
How do I iterate controls in a Windows Form App?[^] at Stack Overflow.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 205
1 Richard MacCutchan 185
2 DamithSL 170
3 Tomas Takac 146
4 OriginalGriff 132
0 OriginalGriff 5,130
1 DamithSL 4,237
2 Maciej Los 3,700
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,846


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 29 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100