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


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
Contributor
Posts: 14
Registered: ‎02-25-2011
My Device: Dev Alpha B
My Carrier: AT&T
Accepted Solution

Issue with StackLayout

Hi,

 

I'm trying to create a layout that has a DropDown at the top of the page, followed by a DockLayout with various controls. I have it set up as a StackLayout which contains those two controls - originally I just had the DropDown docked to the top of the DockLayout, this worked fine, but the list itself appears to be translucent which made it impossible to read when open.

 

The problem is that the DockLayout isn't filling the screen, it's just the size of the controls. I have VerticalAlignment.Fill specified on both the StackLayout and the DockLayout, but it isn't helping. Any ideas?

 

Container

{

 

layout: StackLayout{

}

verticalAlignment: VerticalAlignment.Fill

 

horizontalAlignment: HorizontalAlignment.Fill

 

DropDown{

 

verticalAlignment: VerticalAlignment.Top

 

horizontalAlignment: HorizontalAlignment.Center

}

 

Container{

 

layout: DockLayout{

}

verticalAlignment: VerticalAlignment.Fill

 

horizontalAlignment: HorizontalAlignment.Fill

 

....

}

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Issue with StackLayout

Hi! Try setting preferredWidth: Infinity to outer container.

Set container backgrounds to solid colors to see which one does not take all the space available.

Andrey Fidrya, @zmeyc on twitter
Contributor
Posts: 14
Registered: ‎02-25-2011
My Device: Dev Alpha B
My Carrier: AT&T

Re: Issue with StackLayout

Thanks, that's a good idea. I'll give it a whirl and get back to you....

Contributor
Posts: 14
Registered: ‎02-25-2011
My Device: Dev Alpha B
My Carrier: AT&T

Re: Issue with StackLayout

setting preferredHeight: Infinity to the inner container did the trick. Thanks!