Jump to content
Sign in to follow this  
IElite

Layout's Stretch ?

Recommended Posts

I am trying to layout three buttons on the bottom of my app.

If I stack them, this works:

fLayout:= Layout.Client(Layout.Margins(5).Spacing(5),
                          [Layout.Top(Layout.Center(fImage)),
                           Layout.Bottom(Layout.Spacing(5), Layout.Center(fBackBtn)),
                           Layout.Bottom(Layout.Spacing(5), Layout.Center(fMapBtn)),
                           Layout.Bottom(Layout.Spacing(5), Layout.Center(fCompleteBtn)),
                          Layout.Client(fDiv)]
                         );

dm3dso.png


but i dont want to stack them, I want them all in line with one another.....but this doesn't work. I do not get an error, but the code doesn't do anything at all.

fLayout:= Layout.Client(Layout.Margins(5).Spacing(5),
                          [Layout.Top(Layout.Center(fImage)),
                           Layout.Bottom(Layout.Left(Layout.Spacing(5).Stretch, [fBackBtn, fMapBtn, fCompleteBtn])),
                          Layout.Client(fDiv)]
                         );

How can I make it look like this with the three buttons?

rw02nn.png

Share this post


Link to post
Share on other sites

SOLVED IT!  I needed to specify the height of the BOTTOM layout  (e.g. Layout.Height(32)) 

 

 

fLayout:= Layout.Client(Layout.Margins(5).Spacing(5),
                          [Layout.Top(Layout.Center(fImage)),
                           Layout.Bottom(Layout.Height(32), Layout.Left(Layout.Spacing(5).Stretch, [fBackBtn, fMapBtn, fCompleteBtn])),
                          Layout.Client(fDiv)]
                         );

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×