1. Computing
Send to a Friend via Email

Add a Little Color to Your Shoes

By

3 of 4

Borders for Debugging
Add a Little Color to Your Shoes

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
  1. About.com
  2. Computing
  3. Ruby
  4. Graphical User Interfaces
  5. Shoes
  6. Borders for Debugging

©2014 About.com. All rights reserved.