Quick question... I have 4 strings which hold colours that represent the BackColors of 4 buttons. They are Red, Blue, Green and Black and lets say the are called. Col1, Col2, Col3 and Col4. These values will be subject to change but not to any specific colours which is why they are stored in strings.
Now I know this works....
But if I try this...
...it doesn't work. To be honest I didn't expect it to.
I there a simple way to do this or will I have to resort to a massive If... block?
Now I know this works....
Visual Basic:
Button1.BackColor = Color.Red
Button2.BackColor = Color.Blue
Button3.BackColor = Color.Green
Button4.BackColor = Color.Black
But if I try this...
Visual Basic:
Button1.BackColor = Color.Col1
Button2.BackColor = Color.Col2
Button3.BackColor = Color.Col3
Button4.BackColor = Color.Col4
...it doesn't work. To be honest I didn't expect it to.
I there a simple way to do this or will I have to resort to a massive If... block?