Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Draw in TStatusBar
Do not forget to set Style property of the StatusBar1.Panels to psOwnerDraw.Just write an OnDrawPanel event handler for the StatusBar like this:
procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar;
Panel: TStatusPanel; const Rect: TRect);
var
BitMap: TBitMap;
begin
Bitmap:=TBitmap.Create;
Bitmap.LoadFromFile('Factory.bmp');
with StatusBar1.Canvas,Rect do
begin
Brush.Color:=clRed;
FillRect(Rect);
Draw(Succ(Left),Succ(Top),BitMap);
end;
end;
-
More for developers