Click here to Skip to main content
15,921,062 members
Home / Discussions / C#
   

C#

 
GeneralTabcontrol Pin
Tom Wright24-Jun-05 8:17
Tom Wright24-Jun-05 8:17 
GeneralRe: Tabcontrol Pin
Luis Alonso Ramos24-Jun-05 13:20
Luis Alonso Ramos24-Jun-05 13:20 
GeneralRe: Tabcontrol Pin
Tom Wright26-Jun-05 15:49
Tom Wright26-Jun-05 15:49 
GeneralRe: Tabcontrol Pin
Luis Alonso Ramos27-Jun-05 5:17
Luis Alonso Ramos27-Jun-05 5:17 
GeneralClass Generator Pin
Leyu24-Jun-05 6:22
Leyu24-Jun-05 6:22 
GeneralRe: Class Generator Pin
Steve Maier24-Jun-05 8:40
professionalSteve Maier24-Jun-05 8:40 
GeneralRe: Class Generator Pin
ChesterPoindexter24-Jun-05 13:36
professionalChesterPoindexter24-Jun-05 13:36 
Generalassignment to controls ( Label) Pin
pbsamson24-Jun-05 5:49
pbsamson24-Jun-05 5:49 
Hi,

I have a series of labels named light1, light2,...
I'm in a foreach loop of a HashTable i where the indexes are named light1,light2,...
Is there a way to change the proprerty of a Label without doing something like:
foreach ( String i in backupserver.Keys ){
.
.
.
if ( i.Equals("light1" ) )
light1.BackColor= System.Drawing.Color.LimeGreen;
if ( i.Equals("light2") )
light2.BackColor= System.Drawing.Color.LimeGreen;
.
.
.

I'd like to be able to do something like:
foreach ( String i in backupserver.Keys )
{
.
.

"i".light1.BackColor= System.Drawing.Color.LimeGreen;
}

Where "i" would be translated at runtime to light1,light2...

Other than that it takes a lot of lines to have all the condition covered.

Hope someone can help!

Thanks

Pierre
GeneralRe: assignment to controls ( Label) Pin
Marc Clifton24-Jun-05 6:20
mvaMarc Clifton24-Jun-05 6:20 
GeneralRe: assignment to controls ( Label) Pin
pbsamson24-Jun-05 6:27
pbsamson24-Jun-05 6:27 
GeneralLine Width Pin
Leslie Sanford24-Jun-05 5:43
Leslie Sanford24-Jun-05 5:43 
GeneralRe: Line Width Pin
Judah Gabriel Himango24-Jun-05 5:56
sponsorJudah Gabriel Himango24-Jun-05 5:56 
QuestionHow to use windows ping utility in C#? Pin
Mohamed El Gohary24-Jun-05 5:39
Mohamed El Gohary24-Jun-05 5:39 
AnswerRe: How to use windows ping utility in C#? Pin
Judah Gabriel Himango24-Jun-05 5:52
sponsorJudah Gabriel Himango24-Jun-05 5:52 
AnswerRe: How to use windows ping utility in C#? Pin
Mike Dimmick24-Jun-05 6:08
Mike Dimmick24-Jun-05 6:08 
Generalsearch ip address Pin
amarsumanth24-Jun-05 5:36
amarsumanth24-Jun-05 5:36 
GeneralRe: search ip address Pin
Judah Gabriel Himango24-Jun-05 5:50
sponsorJudah Gabriel Himango24-Jun-05 5:50 
GeneralRe: search ip address Pin
amarsumanth24-Jun-05 7:41
amarsumanth24-Jun-05 7:41 
GeneralRe: search ip address Pin
Dave Kreskowiak24-Jun-05 8:06
mveDave Kreskowiak24-Jun-05 8:06 
Generalping Pin
amarsumanth24-Jun-05 8:55
amarsumanth24-Jun-05 8:55 
GeneralRe: ping Pin
Dave Kreskowiak24-Jun-05 9:32
mveDave Kreskowiak24-Jun-05 9:32 
GeneralNaN Pin
hain24-Jun-05 5:23
hain24-Jun-05 5:23 
GeneralRe: NaN Pin
Richard Deeming24-Jun-05 8:04
mveRichard Deeming24-Jun-05 8:04 
Generaladmin password Pin
amarsumanth24-Jun-05 5:10
amarsumanth24-Jun-05 5:10 
GeneralRe: admin password Pin
Judah Gabriel Himango24-Jun-05 5:13
sponsorJudah Gabriel Himango24-Jun-05 5:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.