1. Home
  2. Computing & Technology
  3. Ruby

Add a Little Color to Your Shoes

By Amanda & Michael Morin, About.com

3 of 4

Borders for Debugging

In Shoes, any container can have a border. The border draws along the outside of the container, either for visual appeal or for debugging purposes. It can be a good visual cue as well. When writing Shoes code, I often give all my containers a red border so I have a visual identifier of where they are. When the application is finished, the red borders are removed.

Shoes.app :width => 300, :height => 150 do
  background papayawhip

  stack do
    border red
    title "Title",
      :stroke => steelblue
  end

  stack do
    border red
    para "One"
    para "Two"
  end
end
Explore Ruby
About.com Special Features

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

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Ruby
  4. GUI
  5. Shoes
  6. Borders for Debugging

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

All rights reserved.