Forum: Ruby green shoes: placing 3 equidistant images

64a808c19ac542b14c4021dcb9484a37?d=identicon&s=25 Ruby Student (rubystudent66)
on 2013-06-01 23:19
(Received via mailing list)
Hello there,

I have three small images which I would like to place right at the
beginning of my windows. That is working fine. However. I would like to
place image1 on the top left corner, image2 right on the center and
image3
on the top right corner. All images must be equidistant.

The following code places the images next to each other:
flow do
        image  "/home/rstudent/MyData/Programs/shoes/image1.jpg"
        image  "/home/rstudent/MyData/Programs/shoes/image2.jpg"
        image  "/home/rstudent/MyData/Programs/shoes/image3.png"
 end

The following code places the first two images next to each other, and
the
third image below:
    stack :width => "50%" do
      flow do
        image  "/home/rstudent/MyData/Programs/shoes/image1.jpg"
        image  "/home/rstudent/MyData/Programs/shoes/image2.jpg"
        image  "/home/rstudent/MyData/Programs/shoes/image3.png"
     end
  end

Probably there is a way to do what I want, but I can't find it after
searching the web for over one hour.

Any help is appreciated, as usual.
689dae2a2a14404ed27048633f472147?d=identicon&s=25 ashbb shoeser (satoshi_a)
on 2013-06-03 15:21
(Received via mailing list)
Hi Ruby Student,

I think that you are looking for `align` style like this.

require 'green_shoes'
Shoes.app do
  para 'hello', align: 'left'
  para 'hello', align: 'center'
  para 'hello', align: 'right'
end

But, the style is ready for TextBlock elements only, not ready for Image
elements, sorry.

ashbb
64a808c19ac542b14c4021dcb9484a37?d=identicon&s=25 Ruby Student (rubystudent66)
on 2013-06-03 16:11
(Received via mailing list)
ashbb,

As usual, thank you for your help.
I actually knew the alignment for text. But I went crazy trying
everything
and anything for *image*. Perhaps in the future the *align* will be
provided for *image.*

Thank you for your help and for not getting annoyed with my stupid
questions.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.