changing panel colors
<p>Hi
I created a simple code here just to play C# around. It has 3 buttons and 1 panel.
If you click on the 2nd &amp; 3rd button the panel height changes.
Is that also possible to change the color?
For example : 
If I click on the 2nd button, I would like to have it as yellow and at the same time the height changes as well.
and the same with 3rd button.
Thanks :-)</p>

<pre><code>public partial class Form1 : Form
 {
public int heightPanel;

  public Form1()
    {
  InitializeComponent();
  heightPanel = panel1.Height;
    }

  private void button1_Click(object sender, EventArgs e)
    {
  panel1.Height = heightPanel;
    }

  private void button2_Click(object sender, EventArgs e)
    {
  panel1.Height = this.Height/2;
    }

  private void button3_Click(object sender, EventArgs e)
    {
  panel1.Height = this.Height - 150;
    }
  }
</code></pre>

<p>I have an idea but I don't know where to put this
I think it would be something like this:
panel1.Height=this.BackColor.ToString();
Any inputs?</p>

<p>Thanks </p>

<p>Hi
Thanks for the reply. Yes I would like to retain the 3 colors if I click in any of the button. I'm not sure if it's possible.
for ex: my button1 =pink
button2=yellow
button3=green
If I click on the button 1 I'll see the pink color and if I click on the button2 I'll see the pink and yellow.</p>

<p>Is that possible?</p>

<p>Thanks again</p>
