hello
i am trying to add a container having some UI components as child in it to a canvas and also want to set the border size only using the action script without MXML,
1) is it possible to add the container that is a lower class in hierarchy from parent to child upward, can canvas addchild() accepts the container as child ?
2) how to set the border of both the canvas and the container ?
i need to do this in action script i have tried but nothing comes out here is the code: -
var contain:Container = new Container();
if(ename.text.length >0)
{
var newename:TextInput = new TextInput();
var newnamet:Label = new Label();
newnamet.text = namet.text;
newnamet.x = 5;
newename.text = ename.text;
newename.x = 100;
newnamet.y = newename.y = 20+contain.measuredHeight;
contain.addChild(newnamet);
contain.addChild(newename);
//contain.measure();
}//end if
contain.x=5;
contain.y =20+childcanvas.measuredHeight;
childcanvas.addChild(contain);