JVCL Help:TJvImagesViewer.OnLoadProgress

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Occurs periodically during slow operations that affect the image being loaded.


Pascal

 TJvImageViewerLoadProgress = procedure (Sender: TObject; Item: TJvPictureItem; Stage: TProgressStage; PercentDone: Byte; RedrawNow: Boolean; const R: TRect; const Msg: string) ofobject;
propertyOnLoadProgress: TJvImageViewerLoadProgress;


Parameters

Parameters Description
RedrawNow True if the control should be redrawn.
R Indicates whether the image can safely be drawn on screen at this point. The R parameter specifies the portion of the image 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.
PercentDone An approximation of how much of the operation has completed. Use PercentDone to update the position of a progress bar or other indicator.
Sender The object that triggered the event.
Item The item that is being loaded.
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.


Description

OnLoadProgress is generated by the particular graphic that the picture object contains. Whether OnLoadProgress occurs depends upon the type of graphic the item is loading. Some graphics generate this event, others do not. Jpeg images, for example, generate an OnLoadProgress event.
Write an OnLoadProgress event handler to provide the user with feedback during slow operations such as loading large compressed images.


About

Notes

The PercentDone parameter is only an approximation. With some image formats, the value of PercentDone may actually decrease from the value in previous events, as the graphic object discovers there is more work to do.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page