1. Home
  2. Computing & Technology
  3. Ruby

Displaying Images With Shoes

By , About.com Guide

1 of 4

Displaying Images

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

Explore Ruby
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Ruby
  4. GUI
  5. Shoes
  6. Displaying Images With Shoes

©2009 About.com, a part of The New York Times Company.

All rights reserved.