Search code examples
rubyshoes

Background image inside a stack in Ruby Shoes


I've been trying to set a background image to the stack but I can't get it to work, am I doing something wrong? Here's my code

Shoes.app(:width => 550,
      :height => 450) do

#Main container so I don't have to deal with scroll
stack(:width  => 550,
      :height => 450,
      :scroll => false) do
    background(image("img/intro_bg.jpg"))
end

end

I'm trying to avoid the scroll bar to appear since the re-size property doesn't work at all :/


Solution

  • Assuming img/intro_bg.jpg exists, please change

    background(image("img/intro_bg.jpg"))
    

    to

    background('img/intro_bg.jpg')