Progressbar.range read/write property


Get or set the Progressbar progression range. The range value is a proxy table with the following fields :

You can get or set the following fields :
  • range.min: a number, representing the starting position of the Progress bar.
  • range.max: a number, representing the maximum position of the Progress bar.

Example

local ui = require "ui" -- create a simple window local win = ui.Window("Progressbar.range sample", 320, 200) local pb = ui.Progressbar(win) pb.range = { 0, 3 } win:status("") pb:center() -- Spawn a Task to increase Progressbar progression async(function() repeat pb:advance(1) win:status("Step ".. pb.position) sleep(1000) until pb.position == 3 end) ui.run(win):wait()