# Have some Shoes questions!

**URL:** <https://www.ruby-forum.com/t/have-some-shoes-questions/195214>\
**Category:** Ruby\
**Created:** [September 19, 2010, 11:27pm UTC](https://www.ruby-forum.com/t/have-some-shoes-questions/195214 "2010-09-19T23:27:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e47c2d/32.png) [@rubina](https://www.ruby-forum.com/u/rubina)\
**Post date:** [September 19, 2010, 11:27pm UTC](https://www.ruby-forum.com/t/have-some-shoes-questions/195214/1 "2010-09-19T23:27:27Z")

</div>

Hello All,

I recently started playing with Shoes to learn it during my Ruby  
learning journey.  
It appears to be easy, although the current doc is not what a beginner  
like I would prefer.  
googling around I found a nice website,  
[http://shoes-tutorial-note.heroku.com/](http://shoes-tutorial-note.heroku.com/), which has some nice simple  
samples programs, just what beginners, like I, need.  
On my learning, I heavely borrowed from a program, simple-calc.rb,  
listed on the tutorial mentioned above. I hope the developer of this  
pgm does not get upset.  
I have some questions which I would like help with.

First, should I post Shoes questions to removed\_email\_address@domain.invalid or should  
my questions go to removed\_email\_address@domain.invalid? or Both?  
I am attaching my image so you can analyze it and comment on it.

1 - When placing a number of buttons, such as the ones found in a  
calculator, how can I tell Shoes to place them on the center of the  
pane, without having to specify margin?

```
   flow :width => "100%", :margin => 58 do
           %w(7 8 9 + sin 4 5 6 - cos 1 2 3 * sinh tan cot 0 ln /

```

cosh Exp log  
tanh = Mod n! sqrt x_2 x_y % e Pi Clr Ce).each do |btn|  
button btn, :width =\> 46, :height =\> 46 do  
method = case btn  
when /[0-9]/; ‘press\_’+btn  
when ‘+’; ‘press\_add’  
when ‘-’; ‘press\_sub’  
when ‘\*’; ‘press\_times’  
when ‘/’; ‘press\_div’  
when ‘=’; ‘press\_equals’

```
    ect, etc, etc
                           end # case
                   end # button do
           end # each do
   end # flow

```

2 - I am using a stack do with nothing inside (between the do and the  
end) to keep items within a flow one on top of the other, is there a  
different way to do this?  
flow :margin =\> 6 do  
radio; para strong(“512b BK”)  
radio; para strong(“1K BK”)  
radio; para strong(“MB”)  
radio; para strong(“GB”)  
radio; para strong(“TB”)

```
           stack do
           # I am using this as a way to stack up groups.
           # There might be a much better way!
           end

           radio; para strong("Deg")
           radio; para strong("Rad")
           radio; para strong("Grad")
           radio; para strong("DEC")
           radio; para strong("HEX")
           radio; para strong("BIN")
   end # flow

```

3 - I tried to use the Pi symbol and the square root (âˆš) symbol and  
other symbols as caption/lable for the corresponding buttons, but I  
got an errors or the wrong thing displayed. Is there a way to  
accomplish this?

4 - It looks like I can achieve the same function with para and  
caption. What is the difference between the two?

5 - How can I reduce the space between flows?

Thank you for your help!
