Board index » cppbuilder » Colored Status bar

Colored Status bar


2004-12-22 07:56:04 PM
cppbuilder12
Hi there,
How I can colored only one Panel in a status Bar? Can anyone help me?
Tanks in advance
Antonio
 
 

Re:Colored Status bar

Hi,
set the panels Style property to psOwnerDraw.
Then create a handler for the StatusBars OnDrawPanel event
and identify the panel to be drawn by its pointer, f.e.:
void __fastcall TForm1::StatusBar1DrawPanel(TStatusBar *StatusBar,
TStatusPanel *Panel, const TRect &Rect)
{
if(Panel == StatusBar->Panels->Items[0])
{
...
StatusBar->Canvas->Brush->Color = clRed;
StatusBar->Canvas->Rectangle(Rect);
...
}
}
hth,
Nick
Quote
Hi there,
How I can colored only one Panel in a status Bar? Can anyone help me?

Tanks in advance

Antonio