ProgressBar Object

Parents, Children, Properties, Methods, Events

Purpose: The ProgressBar object is used to indicate the progress of a lengthy operation.

Description

The ProgressBar object is a window that an application can use to indicate the progress of a lengthy operation. The appearance of the bar in the ProgressBar is determined by the ProgressStyle property.

If ProgressStyle is Normal or Smooth, the size of the bar, intended to indicate the amount of progress, is determined using the Thumb property in relation to its Limits property, and/or using the ProgressStep method. This can be updated as appropriate in the application logic or by using a Timer.

The range of a ProgressBar is specified by the Limits property. This is a 2-element integer vector defining its minimum and maximum values. The position of the filled rectangle is specified by the Thumb property. You can update the ProgressBar by using ⎕WS to set the value of the Thumb directly, or by using the ProgressStep method. The latter causes the Thumb to be updated by the value of the Step property.

If you attempt to set the Thumb to a value greater than its maximum value (using either method) the behaviour depends upon the value of the Wrap property which is Boolean and has a default value of 1. If Wrap is 1, the value obtained when you set the Thumb property is given by the expression:

      LIMITS[1]+(1+LIMITS[2]-LIMITS[1])|THUMB-LIMITS[1]

where THUMB is the value to which you set the Thumb property and LIMITS is the value of the Limits property. This causes the highlighted rectangle to begin filling again from the left.

If ProgressStyle is Marquee, the size of the bar is fixed and its position changes with time according to the value of the Interval property. The values of Thumb, Limits, Wrap and Step are irrelevant.