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

Adobe AIR Development

Reply
Highlighted
Developer
Posts: 21
Registered: ‎01-24-2010
My Device: Bold 9700
My Carrier: Orange
Accepted Solution

PlayBook UI components not displaying

I have the following code inside a class which extends Container:

var button:LabelButton = new LabelButton();
button.label = "Button 1";
addChild(button);
			
var button1:LabelButton = new LabelButton();
button1.label = "Button 2";
addChild(button1);
When I run in the simulator all I can see is the button with label "Button2". I would imagine that "Button 1" is underneath. Why is this?
Developer
Posts: 21
Registered: ‎01-24-2010
My Device: Bold 9700
My Carrier: Orange

Re: PlayBook UI components not displaying

Problem solved, I needed to set the size of the container...the buttons then displayed correctly.

 

container.setSize(...,...);