3
I have the following code that serves to change the color of the buttons that are in a panel:
private void mudaCorBotao(Button bt)
{
foreach(Control b in Panel_esq.Controls)
{
if (/*[O que devo colocar aqui?]*/)
{
b.BackColor = SystemColors.HotTrack;
b.ForeColor = Color.White;
}
}
bt.BackColor = Color.White;
bt.ForeColor = Color.Black
}
What I’m trying to do is: When the user clicks on any button on that panel, it will return all the other buttons to the default color and place the button clicked on a different color. But I have no idea what I should put inside this if
.
I did not know that there was this "is" no if! I paid a lot of dick already in situations that this "is" would help a lot. Thanks.
– WitnessTruth