A simple progress bar is 150 pixels wide, but you can use the :width
style (as with all Green Shoes elements) to lengthen it.
Note: The minimum size is 150 pixels wide in Green Shoes.
Shoes.app do
title "Progress example"
@p = progress left: 10, top: 100, width: width-20
animate do |i|
@p.fraction = (i % 100) / 100.0
end
end
Take a look at the Common methods page for a list of methods found an all elements, including progress bars.
Returns a decimal number from 0.0 to 1.0, indicating how far along the progress bar is.
Sets the progress to a decimal number between 0.0 and 1.0.
Next: Radio