Board index » cppbuilder » Colored Status bar
Antonio Cava
![]() CBuilder Developer |
Antonio Cava
![]() CBuilder Developer |
Colored Status bar2004-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 |
nicolasr
![]() CBuilder Developer |
2004-12-22 08:12:28 PM
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 QuoteHi there, |