Hi all,
i have a small problem. I can't set the left position of a button.
Sample:
Shoes.app :width => 200, :height => 100 do
stack do
para "Hello World!", :align => "center"
button("Close", :width => 100, :left => 50) { exit }
end
end
I would expect, that the button is centered, but it sticks to the left
margin of the window.
Is there something wrong with my code or is it a shoes problem?
I'm using
Shoes Policeman r1514
Arch Linux
and build shoes myself from the github source code.
Ciao
gunther
Hi Gunther,
for that to work as you've written it, you need to add in a top coordinate
as well:
button("Close", :width => 100, :left => 50, :top => 50) { exit }
Requiring both top and left is mentioned, but not explicitly so, on page 16
of Nobody Knows Shoes. Really worth a read if you want to figure out Shoes
positioning.
I guess we should at least amend the manual to explain that.
-----------------------
i5m.co.uk
GPG Key: 0xA18A602B
On Tue, Sep 7, 2010 at 12:51 PM, Gunther Diemant <G.Diemant@gmx.net> wrote:
>
> Hi all,
> i have a small problem. I can't set the left position of a button.
>
> Sample:
>
> Shoes.app :width => 200, :height => 100 do
> stack do
> para "Hello World!", :align => "center"
> button("Close", :width => 100, :left => 50) { exit }
> end
> end
>
> I would expect, that the button is centered, but it sticks to the left
> margin of the window.
>
> Is there something wrong with my code or is it a shoes problem?
>
> I'm using
> Shoes Policeman r1514
> Arch Linux
>
> and build shoes myself from the github source code.
>
> Ciao
> gunther
>
>
Thanks. Somhow I missed this. -------- Original-Nachricht -------- > Datum: Tue, 7 Sep 2010 13:57:00 +0100 > Von: i5m <i5ivem@gmail.com> > An: shoes@librelist.com > Betreff: Re: [shoes] Position of button > Hi Gunther, > > for that to work as you've written it, you need to add in a top coordinate > as well: > > button("Close", :width => 100, :left => 50, :top => 50) { exit } > > Requiring both top and left is mentioned, but not explicitly so, on page > 16 > of Nobody Knows Shoes. Really worth a read if you want to figure out Shoes > positioning. > > I guess we should at least amend the manual to explain that. > > ----------------------- > i5m.co.uk > GPG Key: 0xA18A602B > > > On Tue, Sep 7, 2010 at 12:51 PM, Gunther Diemant <G.Diemant@gmx.net> > wrote: > > > > > Hi all, > > i have a small problem. I can't set the left position of a button. > > > > Sample: > > > > Shoes.app :width => 200, :height => 100 do > > stack do > > para "Hello World!", :align => "center" > > button("Close", :width => 100, :left => 50) { exit } > > end > > end > > > > I would expect, that the button is centered, but it sticks to the left > > margin of the window. > > > > Is there something wrong with my code or is it a shoes problem? > > > > I'm using > > Shoes Policeman r1514 > > Arch Linux > > > > and build shoes myself from the github source code. > > > > Ciao > > gunther > > > >