ashbb / green_shoes

Green Shoes is one of the colorful Shoes written in pure Ruby.
Other
204 stars 37 forks source link

flows, para's, and caption issues #80

Closed gump67 closed 10 years ago

gump67 commented 10 years ago

Hello!

Currently I am working with the following code:

Shoes.app :width => 1000, :height => 500 do

  flow :margin_left => 10 do
    para "XMLElementName:"
    edit_line "A"
    edit_line "B"

    flow :margin_left => 10 do
      edit_line "C"
    end
  end

end

So in theory, from what I have seen of shoes in sample pictures and codes, it should look like the following: XMLElementName: [A] [B] [C]

However, I am getting this:

XMLElementName: [A] [B] [C]

I need the text boxes on the same line as the edit_lines.

Is this a feature, bug, or am I doing something wrong?

Thanks, Gumpy

PS: The margins wont stick with this article, but the margin indention is working correctly.

ashbb commented 10 years ago

This is one of the difference between Red Shoes and Green Shoes. You need to add :width size explicitly.

para "XMLElementName:", width: 200

Refer to vs.RedShoes on Green Shoes manual. ;-)

gump67 commented 10 years ago

Oops! Okay, I thought that manual example only dealt with specifically a use case dealing with the 'times' multiplier and not about controlling 'new lines' in the UI. Now parent.width makes a bit more sense.

Regardless, this works.

Thanks again,

Gumpy