The Green Shoes Manual 1.1.362

Progress

Progress bars show you how far along you are in an activity. Usually, a progress bar represents a percentage (from 0% to 100%.) Green Shoes thinks of progress in terms of the decimal numbers 0.0 to 1.0.

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.

fraction() ยป a decimal number

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