User Tools

Site Tools


prop_progress.htm
Navigation:  Language Reference > App C - PROP: Runtime Properties > Complete Property List >====== PROP:Progress ====== Previous pageReturn to chapter overviewNext page

You can directly update the display of a PROGRESS control by assigning a value (which must be within the range defined by the RANGE attribute) to the control's PROP:progress property.

Example:

BackgroundProcess  PROCEDURE        !Background processing batch process

Win  WINDOW('Batch Processing…'),AT(,,400,400),TIMER(1),MDI,CENTER

   PROGRESS,AT(100,140,200,20),USE(?ProgressBar),RANGE(0,200)

   BUTTON('Cancel'),AT(190,300,20,20),STD(STD:Close)

  END

CODE

OPEN(Win)

OPEN(File)

?ProgressBar{PROP:rangehigh} = RECORDS(File)

SET(File)                  !Set up a batch process

ACCEPT

 CASE EVENT()

 OF EVENT:CloseWindow

  BREAK

 OF EVENT:Timer              !Process records when timer allows it

  ProgressVariable += 3         !Auto-updates 1st progress bar

  LOOP 3 TIMES

   NEXT(File)

   IF ERRORCODE() THEN BREAK.

   ?ProgressBar{PROP:progress} = ?ProgressBar{PROP:progress} + 1

                     !Manually update progress bar

   !Perform some batch processing code

. . .

CLOSE(File)

prop_progress.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1