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

Posts: 101
Registered: ‎01-06-2014
My Device: Q10
My Carrier: EE
Accepted Solution

Labels not close enough when stacked

I'm trying to put two labels one on top of the other but when I do they still seem far apart. How can I bring then closer to each other?


        Label {
            text: "Hello World"
            textStyle.color: Color.create("#868F98")
        Label {
            text: "Goodbye"
            textStyle.color: Color.create("#868F98")


Posts: 252
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: Labels not close enough when stacked

[ Edited ]

Hi macaronlover,


Have you considered placing the two controls in a StackLayout? There you can then adjust the layout properties (margins, etc.) to place the controls exactly where you want them to be.


Docs: http://developer.blackberry.com/native/documentation/cascades/ui/layouts/index.html

API ref: http://developer.blackberry.com/native/reference/cascades/bb__cascades__stacklayout.html


Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: Labels not close enough when stacked

if nothing helps

try translateY: -20 or so

ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner