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
DeekoVB5
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

 

....

}

Please use plain text.
Developer
Zmey
Posts: 1,507
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

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
Please use plain text.
Contributor
DeekoVB5
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....

Please use plain text.
Contributor
DeekoVB5
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!
Please use plain text.