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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


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
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.
Highlighted
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