PDA

View Full Version : Handling layout spacement



thiagocbalducci
26 Jul 2012, 6:40 AM
I've decided to try a sencha touch project with a layout that i haven't seen ppl use with this framework yet, which is to work with floating components. I haven't been able to find much about this matter while researching it on the web or on sencha's documentation.

My question is if it's possible to achieve this using sencha and if it is, a little tip regarding how to do it would be awesome.

I know how to manage positions using spacer within toolbars and blank containers for vertical spacement but i've been struggling to get that button on the top right corner of the panel, for example.I've read somewhere around here about using attributes like floating : true but it seems this is a bad practice..

Example of the kind of layout i'm talking about : http://img.photobucket.com/albums/v328/thiagoshaman/ideia.png

mitchellsimoens
28 Jul 2012, 6:15 AM
I don't see anything there that you need floating. Layout are CSS based so you can do anything with CSS to position your components.

thiagocbalducci
30 Jul 2012, 7:41 AM
I see, i've managed to achieve this by using right, top, left and bottom ... is this wrong ? I've never really had to work with css and stuff, guess i've gotta study more about css then :)

mitchellsimoens
30 Jul 2012, 7:54 AM
If you are talking about the top/right/left/bottom configs on a component that will turn it into a floating component which isn't what you want.

You can use CSS on the component's div like


float: right