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
Developer
Deepu_George_Jacob
Posts: 235
Registered: ‎12-13-2011
My Device: Curve 9380
My Carrier: Vodafone-IN

Grid layout not working

Hi all,

 

I am created a gridlayout and setted to my main container . I am trying to include other containers inside the main container but my code doesn't work..

 

usageMainContainer = new Container();
usageMainContainer.y = 200;
usageMainContainer.height = 940;
usageMainContainer.width = 768;
usageMainContainer.scrollDirection = ScrollDirection.VERTICAL;
var layout:GridLayout = new GridLayout(1);
layout.padding = 30;
usageMainContainer.layout = layout;

var lbl1:Label = new Label();
lbl1.text = "Label1";
//usageMainContainer.addChild(lbl1);

var lbl2:Label = new Label();
lbl2.text = "Label1";
//usageMainContainer.addChild(lbl2);

cellularContainer = new Container();
cellularContainer.addChild(lbl1);
usageMainContainer.addChild(cellularContainer);

var wifiContainer:Container = new Container();
wifiContainer.addChild(lbl2);
usageMainContainer.addChild(wifiContainer);

stage.addChild(usageMainContainer);

 

 

Please use plain text.