Kodi Documentation  20.0 Kodi is an open source media player and entertainment hub.
Subclass - ControlProgress

Used to show the progress of a particular operation. More...

Collaboration diagram for Subclass - ControlProgress:

## Functions

#### Function: setPercent(percent)

Sets the percentage of the progressbar to show. More...

#### Function: getPercent()

Returns a float of the percent of the progress. More...

## Detailed Description

Used to show the progress of a particular operation.

#### Class: ControlProgress(x, y, width, height, filename[, texturebg, textureleft, texturemid, textureright, textureoverlay])

The progress control is used to show the progress of an item that may take a long time, or to show how far through a movie you are. You can choose the position, size, and look of the progress control.

Note
This class include also all calls from Control
Parameters
 x integer - x coordinate of control. y integer - y coordinate of control. width integer - width of control. height integer - height of control. filename string - image filename. texturebg [opt] string - specifies the image file whichshould be displayed in the background of the progress control. textureleft [opt] string - specifies the image file whichshould be displayed for the left side of the progress bar. This is rendered on the left side of the bar. texturemid [opt] string - specifies the image file which should be displayed for the middl portion of the progress bar. This is the fill texture used to fill up the bar. It's positioned on the right of the  texture, and fills the gap between the  and  textures, depending on how far progressed the item is. textureright [opt] string - specifies the image file which should be displayed for the right side of the progress bar. This is rendered on the right side of the bar. textureoverlay [opt] string - specifies the image file which should be displayed over the top of all other images in the progress bar. It is centered vertically and horizontally within the space taken up by the background image.
Note
You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().

Example:

...
# ControlProgress(x, y, width, height, filename[, texturebg, textureleft, texturemid, textureright, textureoverlay])
self.image = xbmcgui.ControlProgress(100, 250, 250, 30, 'special://home/scripts/test.png')
...

## ◆ getPercent()

#### Function: getPercent()

Returns a float of the percent of the progress.

Returns
Percent position

Example:

...
# getPercent()
print(self.progress.getPercent())
...

## ◆ setPercent()

#### Function: setPercent(percent)

Sets the percentage of the progressbar to show.

Parameters
 percent float - percentage of the bar to show.
Note
valid range for percent is 0-100

Example:

...
# setPercent(percent)
self.progress.setPercent(60)
...