A horizontal bar with an indicator that shows the progress of an operation.
All progressbar controls have a horizontal orientation. The value property contains the current position of the progress indicator; the default is 0. There is a minvalue property, but it is always 0; attempts to set it to a different value are silently ignored.
Go to Property Listing | Method Listing
addEventListener, dispatchEvent, hide, onDraw, removeEventListener, show
Boolean, Bounds (SUI), Dimension (SUI), Number, Object, Point (SUI), ScriptUIGraphics (SUI), String, Window (SUI)
Property |
Type |
Access |
Description |
---|---|---|---|
read/write |
The alignment style for this element. If defined, this value overrides the alignChildren setting for the parent container. This can be a single string, which indicates the alignment for the orientation specified in the parent container, or an array of two strings, indicating both the horizontal and vertical alignment (in that order). Allowed values depend on the orientation value of the parent container. They are not case sensitive. For orientation=row:top, bottom, fill For orientation=column: left, right, fill For orientation=stack:top, bottom, left, right, fill |
||
read/write |
The boundaries of the element, in parent-relative coordinates. Setting an element's size or location changes its bounds property, and vice-versa. |
||
readonly |
An array of child elements. |
||
read/write |
True if this element is enabled. An enabled element can accept input, according to its type. When false, control elements do not accept input, and all types of elements have a dimmed appearance. |
||
readonly |
The graphics object that can be used to customize the element's appearance, in response to the onDraw() event. |
||
read/write |
The help text that is displayed when the mouse hovers over the element. |
||
read/write |
The number of pixels to indent the element during automatic layout. Applies for column orientation and left alignment, or row orientation and top alignment. |
||
read/write |
The upper left corner of this element relative to its parent. The location is defined as [bounds.x, bounds.y]. Setting an element's location changes its bounds property, and vice-versa. |
||
read/write |
The maximum height and width to which the element can be resized. |
||
read/write |
The maximum value in the range. Default is 100. |
||
read/write |
The minimum height and width to which the element can be resized. |
||
read/write |
The minimum value in the range; always 0. If set to a different value, it is ignored. |
||
readonly |
The parent element. |
||
read/write |
The preferred size, used by layout managers to determine the best size for each element. If not explicitly set by a script, value is established by the UI framework in which ScriptUI is employed, and is based on such attributes of the element as its text, font, font size, icon size, and other UI framework-specific attributes.A script can explicitly set this value before the layout manager is invoked in order to establish an element size other than the default. |
||
read/write |
An object that contains one or more creation properties of the container (properties used only when the element is created). A ProgressBar object has no creation properties. The third argument of the add() method that creates it is the initial value (default 0), and the fourth argument is the maximum value of the range (default 100). |
||
read/write |
The current dimensions of this element. Initially undefined, and unless explicitly set by a script, it is defined by a LayoutManager . A script can explicitly set size before the layout manager is invoked to establish an element size other than the preferredSize or the default size, but this is not recommended. Defined as [bounds.width, bounds.height]. Setting an element's size changes its bounds property, and vice-versa. |
||
readonly |
The element type, "progessbar". |
||
read/write |
The current position of the indicator. If set to a value outside the range specified by 0 to maxvalue, it is automatically reset to the closest boundary. |
||
read/write |
True if this element is shown, false if it is hidden. When a container is hidden, its children are also hidden, but they retain their own visibility values, and are shown or hidden accordingly when the parent is next shown. |
||
readonly |
The window that this element belongs to. |
||
readonly |
The bounds of this element relative to the top-level parent window. |
Boolean addEventListener (eventName:String, handler:Function, capturePhase:Boolean=Boolean)
Registers an event handler for a particular type of event occuring in this element.
Parameter |
Type |
Description |
---|---|---|
eventName |
The name of the event. Event names are listed in the JavaScript Tools Guide. |
|
handler |
The function that handles the event. This can be the name of a function defined in the extension, or a locally defined handler function to be executed when the event occurs. A handler function takes one argument, the UIEvent object. |
|
capturePhase |
When true, the handler is called only in the capturing phase of the event propagation. Default is false, meaning that the handler is called in the bubbling phase if this object is an ancestor of the target, or in the at-target phase if this object is itself the target. (default: false) |
Event (SUI) dispatchEvent ()
Simulates the occurrence of an event in this target.
A script can create a UIEvent object for a specific event and pass it to this method to start the event propagation for the event.
undefined hide ()
Hides this element.
undefined onDraw ()
An event-handler callback function, called when the window is about to be drawn.
Allows the script to modify or control the appearance, using the control’s associated ScriptUIGraphics object. Handler takes one argument, a DrawState object.
Boolean removeEventListener (eventName:String, handler:Function, capturePhase:Boolean=Boolean)
Unregisters an event handler for a particular type of event occuring in this element.
All arguments must be identical to those that were used to register the event handler.
Parameter |
Type |
Description |
---|---|---|
eventName |
The name of the event. |
|
handler |
The function that handles the event. |
|
capturePhase |
Whether to call the handler only in the capturing phase of the event propagation. (default: false) |
undefined show ()
Shows this element.
When a window or container is hidden, its children are also hidden, but when it is shown again, the children retain their own visibility states.