# BusyIndicator

A **BusyIndicator** object lets you control the breadcrumbs bar busy indicator from your script.

![](https://3597805814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3XSZSwWow0fDf6fQJobd%2Fuploads%2Fgit-blob-0c2b83dbd29b40301763b94163f5c9cbd7dd5b7b%2Fthrobbler.png?alt=media)

By default a busy indicator simply indicates that something is happening; it can also be used to indicate the progress of a job (percentage complete from 0% to 100%). The user can click the spinning circle to see a description of the jobs that are running, and each job can optionally allow the user to abort it by displaying an _Abort_ link they can click.

**BusyIndicator** objects are created using the [**DOpusFactory**](dopusfactory)**.BusyIndicator** method. The basic steps for using one in your script are:

1. Create the object by calling **DOpus.Create.BusyIndicator()**.
2. Optionally set the **abort** property to **True** to enable user aborting.
3. Call the **Init** method to initialize and display the busy indicator.
4. Call the **Update** method when needed to update the progress or explanatory text.
5. Poll the **abort** property to check for user abort if desired.
6. Call the **Destroy** method to remove the busy indicator when the job is complete.

| Property Name | Return Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| abort         | _bool_      | <p>Before the <strong>Init</strong> method has been called, you can set this property to <strong>True</strong> to enable abort by the user (as shown above).<br>After <strong>Init</strong> has been called, this property will return <strong>True</strong> if the user has clicked the <em>Abort</em> link.<br>The <strong>abort</strong> property does not change if the lister or tab your <strong>BusyIndicator</strong> is associated with closes. If you need to stop when that happens then you must check for it separately, typically by testing the result of the <strong>Update</strong> method.</p> |

| Method Name | **Arguments**                                                                   | Return Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------- | ------------------------------------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Destroy     | _none_                                                                          | _bool_      | <p>Removes the busy indicator from display and destroys its internal data structures. The <strong>BusyIndicator</strong> object itself can be re-used by calling the <strong>Init</strong> method again.<br>Returns boolean success. Failure usually means the lister or tab was closed.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Hide        | _none_                                                                          | _bool_      | <p>Removes the busy indicator from display, but does not destroy its internal data. The indicator can be re-displayed by calling the <strong>Show</strong> method.<br>Returns boolean success. Failure usually means the lister or tab was closed.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Init        | <p>&#x3C;object:window><br>&#x3C;string:description><br>&#x3C;bool:visible></p> | _bool_      | <p>Initializes a <strong>BusyIndicator</strong> object and optionally displays it.<br>The <strong>window</strong> parameter specifies the <a href="lister"><strong>Lister</strong></a> or <a href="tab"><strong>Tab</strong></a> object that the indicator is to be attached to. Using a <strong>Tab</strong> is usually best.<br>The optional <strong>description</strong> parameter lets you specify a text string that is displayed to the user when they click the spinning circle.<br>The optional <strong>visible</strong> parameter lets you make the indicator visible immediately by passing <strong>True</strong>. Alternatively, call the <strong>Show</strong> method to make the indicator visible.<br>Returns boolean success. Failure usually means the lister or tab was closed or invalid.</p> |
| Show        | _none_                                                                          | _bool_      | <p>Displays the busy indicator.<br>Returns boolean success. Failure usually means the lister or tab was closed.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Update      | <p>&#x3C;string:description><br>&#x3C;int:percentage></p>                       | _bool_      | <p>Updates the busy indicator.<br>The <strong>description</strong> parameter lets you specify a new description string.<br>The optional <strong>percentage</strong> parameter lets you specify a new progress bar percentage from 0 to 100. If no <strong>percentage</strong> is specified, and none was set by a previous call, the progress bar displays an animation indicating something is happening without a known percentage.<br>Returns boolean success. Failure usually means the lister or tab was closed.</p>                                                                                                                                                                                                                                                                                       |
