Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
moadib
Posts: 24
Registered: ‎02-06-2012
My Device: developer
Accepted Solution

[BB10 beta sdk] cascades StackLayout

 Labels in vertical stack layout have big spacing between. Why? And how it can be fixed?

 

See screenshot below. There is one horizontal stack and vertical embedded in it.

Vertical layout contains three labels and two images and no have padding or margins setups.

 

stack_layout.png

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: [BB10 beta sdk] cascades StackLayout

Just getting into this myself, and haven't tried to reproduce your results yet. Two suggestions:

1. Check on the device or sim, since the QML preview in Momentics may well act differently in some cases.

2. Try forcing padding/margins to 0 explicitly, in case there are any defaults in some cases. Cascades certainly tries to "make it look good" for you, in some cases, so maybe here too?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Contributor
moadib
Posts: 24
Registered: ‎02-06-2012
My Device: developer

Re: [BB10 beta sdk] cascades StackLayout

[ Edited ]

I've tried to run on simulator and have got same result.

Please use plain text.
New Developer
Nicrea
Posts: 5
Registered: ‎05-05-2012
My Device: android nexus s

Re: [BB10 beta sdk] cascades StackLayout

Post your code here.

Please use plain text.
Developer
mstawick
Posts: 48
Registered: ‎06-24-2010
My Device: Storm 2

Re: [BB10 beta sdk] cascades StackLayout

Labels have deafult margins. Just set them to 0. There's also some line spacing reserved inside labels, and you can't do anything about this right now.

Please use plain text.
Contributor
moadib
Posts: 24
Registered: ‎02-06-2012
My Device: developer

Re: [BB10 beta sdk] cascades StackLayout

Thanks, you're right.
Please use plain text.