Class “ProgressBar”

Object > NativeObject > Widget > ProgressBar

A widget representing a numeric value as a horizontal bar with a growing indicator.

ProgressBar on Android
Android
ProgressBar on iOS
iOS
Type: ProgressBar extends Widget
Constructor: public
Singleton: No
Namespace: tabris
Direct subclasses: None
JSX Support: Element: <ProgressBar/>
Parent Elements: <Canvas/>, <Cell/>, <Composite/>, <Page/>, <RefreshComposite/>, <Row/>, <ScrollView/>, <Stack/>, <Tab/>
Child Elements: Not Supported

Examples

JavaScript

import {ProgressBar, contentView} from 'tabris';

new ProgressBar({
  left: 16, right: 16,
  selection: 50
}).appendTo(contentView);

See also:

JSX Creating a simple ProgressBar [► Run in Playground]

Constructor

new ProgressBar(properties?)

Parameter Type Description
properties Properties<ProgressBar> Sets all key-value pairs in the properties object as widget properties. Optional.

Properties

maximum

The value that represents a progress of 100%. May be negative.

Type: number
Default: 100
Settable: Yes
Change Event: maximumChanged

minimum

The value that represents a progress of 0%. May be negative.

Type: number
Default: 0
Settable: Yes
Change Event: minimumChanged

selection

The actual progress to be displayed.

Type: number
Default: 0
Settable: Yes
Change Event: selectionChanged

state

Android

This property affects the color of the progress indicator. Not supported on iOS.

Type: 'normal' | 'paused' | 'error'
Default: 'normal'
Settable: Yes
Change Event: stateChanged

tintColor

The color used to display the current progress.

Type: ColorValue
Settable: Yes
Change Event: tintColorChanged

Change Events

minimumChanged

Fired when the minimum property has changed.

EventObject Type: PropertyChangedEvent<ProgressBar, number>

Property Type Description
value number The new value of minimum.

maximumChanged

Fired when the maximum property has changed.

EventObject Type: PropertyChangedEvent<ProgressBar, number>

Property Type Description
value number The new value of maximum.

tintColorChanged

Fired when the tintColor property has changed.

EventObject Type: PropertyChangedEvent<ProgressBar, ColorValue>

Property Type Description
value ColorValue The new value of tintColor.

selectionChanged

Fired when the selection property has changed.

EventObject Type: PropertyChangedEvent<ProgressBar, number>

Property Type Description
value number The new value of selection.

stateChanged

Fired when the state property has changed.

EventObject Type: PropertyChangedEvent<ProgressBar, string>

Property Type Description
value string The new value of state.