Table of Contents

TTMSFNCGraphics.DrawProgressBar Method

Renders a progress bar within ARect (TRectF) filled to AValue out of AMax.

API unit family: TMSFNCGraphics Declaring type: TTMSFNCGraphics

Overloads

Overload 1

Renders a progress bar within ARect (TRectF) filled to AValue out of AMax.

procedure DrawProgressBar(ARect: TRectF; AValue: Single; AFormat: string = '%.0f%%'; AMax: Single = 100; AColor: TTMSFNCGraphicsColor = gcYellowgreen; ATextColor: TTMSFNCGraphicsColor = gcBlack; AShowText: Boolean = True; AEnabled: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;

Parameters

Name Description
ARect Bounding rectangle for the progress bar.
AValue Current progress value. Must be between 0 and AMax.
AFormat Format string for the percentage label; use %.0f%% to show whole-number percentage. Default is '%.0f%%'.
AMax Maximum value representing 100% progress. Default is 100.
AColor Fill color of the progress indicator. Default is gcYellowgreen.
ATextColor Color of the percentage label text. Default is gcBlack.
AShowText When True, the percentage label is drawn over the bar. Default is True.
AEnabled When True, the bar is drawn in the enabled state. Default is True.
AScaleFactor DPI scale factor applied to sizing. Default is 1.0.

Overload 2

Renders a progress bar within ARect (TRect) filled to AValue out of AMax.

procedure DrawProgressBar(ARect: TRect; AValue: Single; AFormat: string = '%.0f%%'; AMax: Single = 100; AColor: TTMSFNCGraphicsColor = gcYellowgreen; ATextColor: TTMSFNCGraphicsColor = gcBlack; AShowText: Boolean = True; AEnabled: Boolean = True; AScaleFactor: Single = 1.0); overload; virtual;

Parameters

Name Description
ARect Bounding rectangle for the progress bar, in integer pixels.
AValue Current progress value. Must be between 0 and AMax.
AFormat Format string for the percentage label. Default is '%.0f%%'.
AMax Maximum value representing 100% progress. Default is 100.
AColor Fill color of the progress indicator. Default is gcYellowgreen.
ATextColor Color of the percentage label text. Default is gcBlack.
AShowText When True, the percentage label is drawn over the bar. Default is True.
AEnabled When True, the bar is drawn in the enabled state. Default is True.
AScaleFactor DPI scale factor applied to sizing. Default is 1.0.