Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 在Flex中,如何将子对象添加为第一个子对象?_Apache Flex - Fatal编程技术网

Apache flex 在Flex中,如何将子对象添加为第一个子对象?

Apache flex 在Flex中,如何将子对象添加为第一个子对象?,apache-flex,Apache Flex,我将child添加为: containerComponent.addChild(新组件) 但是,它将其添加为最后一个孩子。如何将NewcomComponent添加为containerComponent的第一个子级?containerComponent.addChildAt(0,NewcomComponent) containerComponent.addChildAt(0,新组件) 在索引参数设置为0时,使用addChildAt而不是addChild: containerComponent.ad

我将child添加为:


containerComponent.addChild(新组件)


但是,它将其添加为最后一个孩子。如何将NewcomComponent添加为containerComponent的第一个子级?

containerComponent.addChildAt(0,NewcomComponent)

containerComponent.addChildAt(0,新组件)

在索引参数设置为0时,使用addChildAt而不是addChild:

containerComponent.addChildAt(newComponent, 0);

在索引参数设置为0时,使用addChildAt而不是addChild:

containerComponent.addChildAt(newComponent, 0);

containerComponent.addChildAt(新组件,0);好的,我把参数放在了前面,我想代码暗示会显示出需要什么,我认为这是很残酷的。促进知识共享的好方法…containerComponent.addChildAt(NewcomComponent,0);好的,我把参数放在了前面,我想代码暗示会显示出需要什么,我认为这是很残酷的。促进知识共享的好方法。。。。