*PROGBAR |
Progress Bar Display |
Initialization: |
CALL "*progbar;Init", title$, barsize, [ , column, row, options$, ctlno ] |
Advance Bar: |
CALL "*progbar;Update", ERR=stmtref, text$ [ , image$ ] |
Show % Complete: |
CALL "*progbar;Update_percent", ERR=stmtref, text$, percent, [ , image$ ] |
Wrapup: |
CALL "*progbar;Wrap_up" |
Where:
title$ |
Required |
Input |
This string contains the title to be displayed on the top of the progress bar window. |
barsize |
Required |
Input |
This numeric value contains the width of the bar to be created in columns (minimum 15). If omitted, the minimum width will be used. |
column, row |
Optional |
Input |
This numeric value contains the column/row number where the window will be created. If not specified, the window will be centered. |
options$ |
Optional |
Input |
This field contains the options to be used in the creation of the dialogue window. Typical use would be to make the dialogue windows concurrent, thereby allowing the user to access controls on the current window. |
ctlno |
Optional |
Input |
This parameter can be set to override the default CTL value to be generated by the Cancel button. (Default is 4.) |
text$ |
Required |
Input |
This string contains the text to be displayed in the progress bar window. |
image$ |
Optional |
Input |
This string contains the optional pathname to an image that will be displayed in the top/left corner of the progress bar window. |
percent |
Required |
Input |
This numeric value contains the percentage of the bar to show as complete. |
(The image$ parameter was added in PxPlus v11.00.)
This routine can be used to display and update a progress bar on the workstation. Two styles of progress bars are provided: one that simply shows progress advancing from left to right and resets back to the left edge when the bar maximum is reached; the second shows the percentage complete as a portion of the bar. Use the percentage complete when the total amount of work is known in advance.
When using the progress bar, you first call the ";Init" entry point with the desired window title and width (in columns) of the bar to display.
To update the bar, call the ";Update" or ";Update_percent". If the user should hit the "Cancel" button on the window or close the window by pressing F4 or Escape, the routine will return with an error code 4. This error code comes from the CTL value for the button and the fact that F4 (CTL 4) is used to close most panels.
When complete, call the ";Wrap_up" entry point to remove the progress bar window.