Chaning panel colour help

have just started to learn c++, for a job i am trying to get. I all ready know basic so i know a bit about programming, i am required to make a GUI application which when a colour is chosen in a combo box the panel will change to that colour also, at the moment i just have the combo box all set up, i just dont know how to do the panel part in c++. Please help , underneth is my coding up to now.

"//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
ComboBox1->ItemIndex = 0;
ComboBox1Change(NULL);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ComboBox1Change(TObject *Sender)
{
switch (ComboBox1->ItemIndex) {
case 0:
Caption = "Red" ;
break;
case 1:
Caption = "Green";
break;
case 2:
Caption = "Blue";
break;
case 3:
Caption = "White";
break;
case 4:
Caption = "Black";
break;
}
}
//---------------------------------------------------------------------------
Topic archived. No new replies allowed.