APLX Help : System Classes : List of Classes : Progress
|
|
![]() |
Progress |
DescriptionThe Progress class implements the 'progress bar' control, typically used to display the progress of a long operation such as copying a large number of files. Progress propertiesThe main Progress properties are: style: The basic style is 0 for a vertical control. Add 1 to make it use smooth increments (recommended), and add 2 to make it a horizontal control (not needed for MacOS - the orientation is deduced from the where property). value: Up to 4 integers of Position, Maximum, Step, Minimum. range: A two-element integer vector giving the minimum and maximum values (default 0 100) increment: An integer scalar giving the amount by which the value will change when the StepIt method is run. without an argument Progress methodStepIt: Increment the value. If called with no arguments, the progress bar value is increased by the increment property. If called with an argument (integer scalar), it increments by the amount specified. Example∇DEMO_Progress;N;X;DEMO [1] ⍝ Sample function demonstrating use of the Progress object [2] ⍝ Default is progress bar from 0 to 100 [3] DEMO←'⎕' ⎕NEW 'Dialog' ⋄ DEMO.title←'Progress Example' [4] DEMO.myProgress.New 'Progress' ⋄ DEMO.myProgress.where←2 1 [5] DEMO.myProgress.scale←1 ⋄ DEMO.myProgress.style←1 [6] ⍝ [7] ⍝ Must show window now, otherwise if won't appear until after loop below [8] DEMO.Show [9] ⍝ [10] :For N :In ⍳10 [11] X←⎕DL 0.3 [12] DEMO.myProgress.value←(N×10) [13] :EndFor [14] ⍝ [15] ⍝ Wait for the user to close the window [16] 0 0⍴⎕WE DEMO ∇ Propertiesalign anchors aquaadjust autodraw caption children class color data doublebuffered dragsource droptarget enabled events extent handle increment maxsize methods minsize name opened order pointer properties range scale self size sourceformats style tabstop targetformats tie tooltip units value visible where winptr MethodsClick Clienttoscreen Close Create Delete Draw Focus Hide New Open Paint Resize Screentoclient Send Set Show Stepit Trigger CallbacksonClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onFocus onHide onKeyDown onKeyPress onKeyUp onMouseDown onMouseMove onMouseUp onOpen onSend onShow onUnFocus |
|
APLX Help : System Classes : List of Classes : Progress
|
Copyright © 1996-2010 MicroAPL Ltd