# Learning Shoes - Have some questions!

**URL:** <https://www.ruby-forum.com/t/learning-shoes-have-some-questions/195202>\
**Category:** Ruby\
**Created:** [September 19, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/learning-shoes-have-some-questions/195202 "2010-09-19T18:13:39Z")\
**Posts on this page:** 2\
**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, 6:13pm UTC](https://www.ruby-forum.com/t/learning-shoes-have-some-questions/195202/1 "2010-09-19T18:13:39Z")

</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 tried  
subscribing to removed\_email\_address@domain.invalid but it was impossible!  
I am attaching my image so you can analyze it and comment on it. The  
image was rejected by the ruby forum. I can send it to whoever would  
like to see it to 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!

---

<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 20, 2010, 6:12am UTC](https://www.ruby-forum.com/t/learning-shoes-have-some-questions/195202/2 "2010-09-20T06:12:58Z")

</div>

> 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.

Hey, thanks for trying out Shoes! What would make the documentation  
better  
for you?

> I hope the developer of this

pgm does not get upset.

I have some questions which I would like help with.

Absolutely not. Feedback is the only way that things get better.

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?

You’re free to post questions to both, but you’ll get better help from  
removed\_email\_address@domain.invalid. I try to pay attention to ruby-talk, but sometimes  
I  
miss threads. I read everything on the shoes-specific list. I don’t  
think  
I’ve seen any of the other core team members post to Ruby-talk, either.

I tried

subscribing to removed\_email\_address@domain.invalid but it was impossible!

Could you elaborate more on what you mean by ‘it was impossible?’ or is  
that  
what’s in this image you’re talking about? feel free to mail it to me  
off-list.

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?

Does this help? [http://shoes.heroku.com/manual/Styles.html#:align](http://shoes.heroku.com/manual/Styles.html#:align)

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?

I’m not sure of exactly what you’re asking. Maybe a screenshot would  
help?

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?

Are you using Shoes 2 or Shoes 3? They use 1.8 and 1.9, respectively,  
and so  
there might be some encoding issues based on which one you’re using.

4 - It looks like I can achieve the same function with para and

caption. What is the difference between the two?

I am not sure, off the top of my head.

5 - How can I reduce the space between flows?

I’m not sure about this one, either…
