uprogressbar (ProgressBar)
The uprogressbar
is a field-level widget the shows the progress of a process or action that is being
executed. Is can only be used in form components. Uniface provides a logical widget called ProgressBar, which is mapped to uprogressbar
.
For more information, see Specifying a Widget for a Field or Entity.
Logical widget name: | ProgressBar |
Maps to physical widget: |
|
Default definition: | ProgressBar=uprogressbar(orientation=horizontal;smooth=false;range=100)
|
Use for: | String fields (not Date) |
Supported triggers: | None. The widget is display-only and does not fire any triggers. |
Supported properties: | See Widget Properties |
Supported in egrid (Grid) widget? |
No |
Supports MSAA? : | No |
Description
The uprogressbar
widget enables the end user to
monitor an operation's progress toward completion. It shows the progress of a lengthy operation by
gradually filling a rectangle with color. The progress may be presented in chunks (the default) or
as a solid fill.
The default maximum value is 100, the maximum which can be assigned is 65535. For record sets smaller then 65535 records, $curocc and $hits can be used to show the progress. For record sets larger then 65535, a percentage needs to be calculated and assigned to the progress bar which then uses the default maximum setting of 100.
To show progress in an operation, the field value (numeric) is continually incremented until the maximum (defined by the Maximum property) is reached. The amount of color displayed by the control is always a ratio of the field value to the maximum value specified by the Maximum property.
For example, if the Maximum property is set to 100, a value of 50 causes the control to display 50 percent of the chunks,
Widget Properties
Property |
Technical Name |
Dynamic? |
---|---|---|
Maximum |
Yes |
|
Orientation |
No |
|
PopupRect |
Yes |
Incrementing a Progress Bar
In a form, draw a Progress Bar named PB, and a Command Button. In the detail trigger of the Command Button, put the following ProcScript:
$fieldproperties(PB) = "Maximum =100" $1=0 while ($1 < 100) PB=$1 $1=$1+1 sleep(10) show endwhile
Click the command button to view the progress shown in the Progress Bar.