1. Computing

Displaying Images With Shoes

By

1 of 4

Displaying Images
Displaying Images With Shoes

When you're using Shoes, displaying images in Shoes is as simple as using the image method. Images can be displayed in any stack or flow which, if you remember, are the components of the Shoes layout manager. The image will take up space in the stack or flow in accordance to the dimensions of the image. For example, images will take up horizontal space in a flow (just like a button or para will) and, if necessary, the flow will wrap further images down to the next line.

Shoes.app :width => 500, :height => 260 do
  image 'shoes-logo.png'
  image 'shoes-logo.png'
  image 'shoes-logo.png'
  image 'shoes-logo.png'
end
  1. About.com
  2. Computing
  3. Ruby
  4. Graphical User Interfaces
  5. Shoes
  6. Displaying Images With Shoes

©2014 About.com. All rights reserved.