The TTMSFNCStatusBar is a component for displaying different styles of panels. These styles include simple text, ellipse text, HTML text, images, date, time, progress bar and custom drawing can be made too.
There are various styles of panels, but drawing your custom panel is also possible. You can achieve this by implementing the OnDrawCustomPanel event.
procedure TForm1.FormCreate(Sender: TObject); var p: TTMSFNCStatusBarPanel; I: Integer; begin TMSFNCStatusBar1.BitmapContainer := TMSFNCBitmapContainer1; for I := 0 to 3 do TMSFNCStatusBar1.Panels.Add; p := TMSFNCStatusBar1.Panels.Items; p.Style := spsOwnerDraw; p.Width := 100; end; procedure TForm1.TMSFNCStatusBar1DrawCustomPanel(Sender: TObject; AGraphics: TTMSFNCGraphics; ARect: TRectF; APanel: TTMSFNCStatusBarPanel); begin AGraphics.DrawEllipse(ARect); end;
It’s also possible to show images in a panel with the use of a TMSFNCBitmapContainer. You can set the panel style to spsImage or spsImageList. The spsImage can be used if a single image and optional text have to be shown. The spsImageList will display a given amount of images (Panel.ImageCount) from the desired index (Panel.ImageIndex).
Every single panel has a Progress property which includes many options for the progress bar to be set. There are 4 levels you can play around with and set them to your own preference. The limit of the levels can be set via the Panel.Progress.Level1Perc and Level2Perc properties.
p.Progress.Position := 55;
p.Progress.Position := 80;
p.Progress.Position := 100;
|XYToPanel(AX, AY: Single): TTMSFNCStatusBarPane||Returns the panel at the given X, Y coordinates.|
|GetPanelRect(Index: Integer): TRectF||Returns the panel rectangle at the given index.|
|OnAfterDrawPanel||Event called after drawing a panel item.|
|OnAnchorClick||Event called when an anchor is clicked.|
|OnBeforeDrawPanel||Event called before drawing a panel item.|
|OnDrawCustomPanel||Event called when drawing a custom panel item.|
|OnPanelLeftClick||Event called when a panel item is clicked with the left mouse button.|
|OnPanelRightClick||Event called when a panel item is clicked with the right mouse button.|