The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



OnShowValue


Unit:SDL_progbar
Class:TProgBar
Declaration:OnShowValue: TBeforeShowValueEvent;
{ TBeforeShowValueEvent = procedure (Sender: TObject; var ValueText: string) of object; }

The OnShowValue event provides a hook to change the text indicating the value of the progress bar. OnShowValue is triggered whenever the Value of the progress bar is about to be displayed. The variable parameter ValueText contains the string to be displayed. You may adjust or replace it in order to change the displayed text.

Example: Following is an example how to add a measurement unit (mA) to the displayed text:
procedure TForm1.PBar1ShowValue(Sender: TObject; var ValueText: String);
begin
ValueText := ValueText+' mA';
end;

Example: This event is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): sdlprogbar



Last Update: 2014-Dec-04