Quick search

Table Of Contents

Progress Bar

バージョン 1.0.8 で追加.

_images/progressbar.jpg

The ProgressBar widget is used to visualize the progress of some task. Only the horizontal mode is currently supported: the vertical mode is not yet available.

The progress bar has no interactive elements and is a display-only widget.

To use it, simply assign a value to indicate the current progress:

from kivy.uix.progressbar import ProgressBar
pb = ProgressBar(max=1000)

# this will update the graphics automatically (75% done)
pb.value = 750
class kivy.uix.progressbar.ProgressBar(**kwargs)[ソース]

ベースクラス: kivy.uix.widget.Widget

Class for creating a progress bar widget.

See module documentation for more details.

max

Maximum value allowed for value.

max is a NumericProperty and defaults to 100.

value

Current value used for the slider.

value is an AliasProperty that returns the value of the progress bar. If the value is < 0 or > max, it will be normalized to those boundaries.

バージョン 1.6.0 で変更: The value is now limited to between 0 and max.

value_normalized

Normalized value inside the range 0-1:

>>> pb = ProgressBar(value=50, max=100)
>>> pb.value
50
>>> pb.value_normalized
0.5

value_normalized is an AliasProperty.