4D v16

Progress SET PROGRESS

Home

 
4D v16
Progress SET PROGRESS

Progress SET PROGRESS  


 

Progress SET PROGRESS ( id ; progress {; message {; foreground}} )  
Parameter Type   Description
id  Longint in ID of progress bar
progress  Real in Value of progress ([0...1] or -1)
message  Text in Message of progress bar
foreground  Boolean in Show progress bar in foreground

The Progress SET PROGRESS method modifies the value of the progress bar along with the information shown in the progress window. It is useful for updating a progress bar within a loop.

In id, you pass the unique ID of the progress bar, returned by the Progress New method.

In progress, you pass the current value of the progress bar. You can pass a Real value (between 0 and 1) or -1 to specify an undefined progress bar (also known as a "Barber shop" bar under Mac OS).

In message, you pass additional text to display under the main title (Windows) or under the progress bar (Mac OS). This parameter is optional.

Pass True in foreground when you want to force the progress window to the foreground of the application.

Example  

Updating of progress bar:

 $P:=Progress New // we create a new bar
  // Carry out processing in a loop
 For($i;1;100)
  // ... code of processing
  // Update progress bar
    $r:=$i/100
    Progress SET PROGRESS($P;$r;"More info")
 End for
  // Deletion of bar once processing is over
 PROGRESS QUIT($P)



See also 

Progress Get Progress

 
PROPERTIES 

Product: 4D
Theme: Progress bars

 
HISTORY 

 
ARTICLE USAGE

4D Progress ( 4D v16)