LinkBar既可以使用数组作为数据提供者,也可以使用一个拥有多个子组件的容器(例如ViewStack)作为
数据提供者。
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:VBox>
<mx:LinkBar dataProvider="{viewStack}" direction="horizontal" labelField="name"/>
<mx:ViewStack id="viewStack">
<mx:Panel width="150" height="150" name="first" label="First Panel" title="First Panel">
<mx:Label text="First label"/>
</mx:Panel>
<mx:Panel width="150" height="150" name="Second" label="Second Panel" title="Second Panel">
<mx:Label text="Second label"/>
</mx:Panel>
<mx:Panel width="150" height="150" name="Third" label="Third Panel" title="Third Panel">
<mx:Label text="Third label"/>
</mx:Panel>
</mx:ViewStack>
</mx:VBox>
</mx:Canvas
LinkBar
最新推荐文章于 2013-12-28 22:24:00 发布