## Progress

### Description

The 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 properties

The 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 method

`StepIt`: 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
         ’

### Properties

align 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

### Methods

Click Clienttoscreen Close Create Delete Draw Focus Hide New Open Paint Resize Screentoclient Send Set Show Stepit Trigger

### Callbacks

onClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onFocus onHide onKeyDown onKeyPress onKeyUp onMouseDown onMouseMove onMouseUp onOpen onSend onShow onUnFocus

Topic: APLX Help : System Classes : List of Classes : Progress

[ Previous | Next | Contents | Index ]