开发者

in Flex, how to add child as first child?

I am开发者_如何学运维 adding child as:

containerComponent.addChild(newComponent);

But, it adds it as last child. How can I add newComponent as first child of containerComponent?


Use addChildAt instead of addChild with the index parameter set to 0:

containerComponent.addChildAt(newComponent, 0);


containerComponent.addChildAt(0, newComponent);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜