GUI ScreenIO for Windows |
Your COBOL field definitions reside in the -4 portion of the panel copybook. For a progress bar, the field definition consists of a simple PIC 9(3) field.
01 panel-4.
|
A progress bar displays a bar in the range of 0 to 100, so you just move the desired value to the progress bar field. In the screen shot below, we entered 67 in the edit control, and all of the progress bars display a bar that's 67 percent of the control.
In your application, you'd calculate your percentage of completion and update the progress bar every so often so that the user can see something is happening. Typically you would update it only if the progress value actually changed.
For those of you who are percentage-challenged, the formula for calculating percentage is:
COMPUTE WORK-PERCENT =
IF WORK-PERCENT NOT =
MY-PROGRESS-BAR
|
© 2000-2019 Norcom, all rights reserved |