The getProgressBar method returns an object of the ProgressBar Control class that is assigned to the progress bar with the specified ID. The ProgressBar class (see ProgressBar Class) provides methods to query and manipulate progress bars.


The arguments are:


The ID of the progress bar.


The number of the category dialog page containing the requested progress bar. This argument must only be specified for category dialogs.

Return value:

An object of the ProgressBar class or .Nil if the requested progress bar does not exist.


The following example initializes and modifies progress bar PROGRESS by sending messages to the object that is returned by GetProgressBar:

::class MyDlgClass subclass UserDialog inherit AdvancedControls

::method InitDialog
  pb = self~getProgressBar("PROGRESS")
  if pb == .Nil then return

::method UpdateProgress
  use arg amount

Note: getProgressBar connects an Object Rexx object with a Windows object. If the object does not exist, the Nil object is returned. Therefore, this method can only be applied after the Windows dialog has been created (after the invocation of StartIt).