From RAD Studio API Documentation
Jump to: navigation, search


TProgressEvent = procedure (Sender: TObject; Stage: TProgressStage;
PercentDone: Byte; RedrawNow: Boolean; const R: TRect; const Msg: string) of object;


typedef void __fastcall (__closure *TProgressEvent)(System::TObject* Sender, TProgressStage Stage, System::Byte PercentDone, bool RedrawNow, const System::Types::TRect &R, const System::UnicodeString Msg);


Type Visibility Source Unit Parent
Vcl.Graphics Vcl.Graphics


TProgressEvent is the type of event handlers that provide feedback during lengthy operations.

Sender is the object that receives the event notification. This is typically the component that initiated the lengthy operation.

Stage indicates whether the operation is beginning, continuing, or ending. If the event handler displays an indicator such as a progress bar, the indicator can be created when Stage is psStarting, updated while Stage is psRunning, and removed when Stage is psEnding.

PercentDone is an approximation of how much of the operation has completed. Use PercentDone to update the position of a progress bar or other indicator.

RedrawNow indicates whether the partial results of the operation can safely be drawn on screen at this point.

R gives the dimensions of the portion of the display that has changed and needs to be redrawn.

Msg contains one or two words that describe what operation is occurring. For example, the value of Msg could be a string such as Loading, Storing, or Reducing colors. The Msg string can also be empty.

TProgressEvent is the type of a list view's Vcl.Graphics.TGraphic.OnProgress, Vcl.Graphics.TPicture.OnProgress and Vcl.ExtCtrls.TImage.OnProgress event handlers.

See Also