GetProgressBar

>>-anAdvancedControl~GetProgressBar(--id--+-------------+--)---><
                                          +-,--category-+


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.

Arguments:

The arguments are:

id

The ID of the progress bar.

category

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.

Example:

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
  pb~setstep(50)
  pb~setrange(,500)

::method UpdateProgress
  use arg amount
  self~GetProgressBar("PROGRESS")~SetPos(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).