Progressbar.position read/write property


Get or set the Progressbar current progression position. The position start from 0 and increase to the maximal position (defaulting to 100).

This minimal and maximal values can be changed using the Progressbar.range property.

Example

local ui = require "ui" -- create a simple window local win = ui.Window("Progressbar.position sample", 320, 200) local pb = ui.Progressbar(win) win:status("") pb:center() win:show() -- update user interface and increase Progressbar progression repeat pb:advance(1) win:status("Position = ".. pb.position) ui.update() until pb.position == 100