widget.newProgressView()

Type Function
Library widget.*
Return value ProgressViewWidget
Revision Current Public Release (2014.2189)
Keywords widget, progress, progressView, progressIndicator
See also ProgressViewWidget

Overview

Creates a ProgressView object.

Gotchas

ProgressViews do not support scaling.

Syntax

widget.newProgressView( options )

This function takes a single argument, options, which is a table that accepts the following parameters:

id (optional)

String. An optional identification to assign to the progress view. Default is widget_progressView.

x / y (optional)

Numbers. Coordinates for the widget's x and y center point. These values will be overridden by left and top if those values are defined.

left / top (optional)

Numbers. The left and top position where the widget will be created. If specified, these values override the x and y parameters.

width (required)

Number. The overall width of the progress view.

isAnimated (optional)

Boolean. Set this to true if the progress change should be animated, false (or omitted) if the progress change should occur instantly.

fillXOffset (optional)

Number. Set this to horizontally offset the fill region of the progress view. Default is 0.

fillYOffset (optional)

Number. Set this to vertically offset the fill region of the progress view. Default is 0.

Methods

Examples

Default
local widget = require( "widget" )

-- Create the widget
local progressView = widget.newProgressView
{
    left = 150,
    top = 200,
    width = 300,
    isAnimated = true
}

-- Set the progress to 50%
progressView:setProgress( 0.5 )