Skip to content

Instantly share code, notes, and snippets.

@MarkGoldberg
Created December 31, 2014 14:04
Show Gist options
  • Save MarkGoldberg/9e9aea74e3ac227989d8 to your computer and use it in GitHub Desktop.
Save MarkGoldberg/9e9aea74e3ac227989d8 to your computer and use it in GitHub Desktop.
Clarion: Working ProgressBar in a TightLoop
PROGRAM
! Purpose: to show that a progress bar can be updated in a tight loop
MAP
END
ProgressBar LONG
Window WINDOW('Test Progress Bar in Tight Loop'),AT(,,463,70),GRAY,FONT('Segoe UI',8),SYSTEM
BUTTON('Start Tight Loop'),AT(191,39,,14),USE(?Start),DEFAULT
PROGRESS,AT(13,13,400),USE(ProgressBar),RANGE(0,100)
END
CODE
OPEN(Window)
ACCEPT
CASE ACCEPTED()
OF ?Start; DO TightLoop
END
END
TightLoop ROUTINE
DATA
N LONG
CODE
ProgressBar = 0
?ProgressBar{PROP:RangeHigh} = 10^5
LOOP N = 1 TO 10^8
IF N % 1000 = 0
ProgressBar += 1
DISPLAY(?ProgressBar)
END
END
MESSAGE('Done')
@Rexcom
Copy link

Rexcom commented Feb 26, 2016

Hi, iam new in Clarion, Known that i wish if you can help me
what CODE MEANS IT , IN WHICH code belong

"CODE"
OPEN(Window)
ACCEPT
CASE ACCEPTED()
OF ?Start; DO TightLoop
END
END

thanks regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment