How to align buttons in Shoes GUI Toolkit in Ruby

426 views Asked by At

I am creating a GUI application using Shoes toolkit in Ruby, and using require 'green_shoes' gem.

project is in progress but i had a problem to align buttons to center does anyone know about how to? i have an example code:

Shoes.app width:500, height: 400 do
     stack do
          para "input here"
          button button1
          @content = edit_line
     end
end
1

There are 1 answers

0
chemical On

You can use: left, right, top, and bottom. I am not sure about centering, but you can give x,y coordinates in pixels.

stack(left: 35, top: 90) do
      para "input here"
      button button1
      @content = edit_line
 end

This is also a good walkthrough: http://shoesrb.com/walkthrough/