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

Web and WebWorks Development

Reply
Developer
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10
My Carrier: alfa Lebanon
Accepted Solution

Change Window Cover Label Position

Is there a way to show the Cover Label on top or middle instead of the bottom part of the Active Frame?

If I want the label to be the full height, what size should I choose?

 

Also, if I update the label & cover with the below code: 

blackberry.ui.cover.labels.push({
		label: 'Test',
		size: 10,
		wrap: true
	});

	blackberry.ui.cover.updateCover();

 Is it supposed to keep adding Test Test Test... or just once and replace it over the previous one!? Because sometimes I'm seeing two lines of the word, I'm not sure why.

 

Thanks

 

 

Wadi
Retired
Posts: 64
Registered: ‎06-04-2012
My Device: Blackberry Z10
My Carrier: Bell

Re: Change Window Cover Label Position

To align with BB10 UI guidelines, cover labels appear on the bottom of the frame. A workaround you can try is to set an image as the cover, and in that image, design it so the text is wherever you want it to be.
----------------------------------------------------------------------------------
- Did this post help solve the issue? Click on "Accept as Solution"
- Was the content of this post helpful? Please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Highlighted
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Change Window Cover Label Position

[ Edited ]

Just to add, blackberry.ui.covers.labels is an array. If you keep pushing objects onto the array, it will render multiple objects.

It's not a readonly property, so you could "reset" it with:

 

blackberry.ui.cover.labels = [];

And then add your specific items.

 

EDIT: Apologies wantoun, nice catch. I've edited the code above to cover instead of covers as you noted.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10
My Carrier: alfa Lebanon

Re: Change Window Cover Label Position

That helped oros, thanks!

Just a heads up for anyone later on, it's actually:
blackberry.ui.cover.labels = [];

(No 's' - it's not a big deal but it slowed me down for a couple of minutes to notice it Smiley Happy )
Wadi