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
New Contributor
Posts: 3
Registered: ‎07-08-2010
My Device: BlackBerry 9780
My Carrier: Vodafone ES

Add to a container image and text vertically

Hi,

I need to add an image and text on a container with ScrollPane

 

var scroller:ScrollPane = new ScrollPane();
scroller.width = 1004;
scroller.height = 600;
scroller.y = 0;
scroller.x = 0;

var c:Container = new Container();
c.align = ContainerAlign.NEAR;
c.flow = ContainerFlow.VERTICAL;
			
var label:Label = new Label();
label.multiline = true;
label.wordWrap = true;
label.autoSize = TextFieldAutoSize.LEFT;
label.width = 1024;
label.htmlText=myObject.getHtmlText();
label.height = label.textHeight;
			
var format:TextFormat = new TextFormat();
format = new TextFormat();
format.font = "Verdana";
format.color = 0x000000;
format.size = 18;
label.format = format;
c.addChild(label);
			

var imagen:Image = new Image();
imagen.setImage(myObject.getBigImage());
imagen.cache=myObject.cacheImagen;

c.addChild(imagen);
			
scroller.setScrollContent(c);
			
c.layout();
addChild(scroller);
c.setSize(1004,600));

The problem is that the image appears on the text or below the text.
I need to center the image and text appear behind the image

 

Thanks!

Pedro Cánovas