如何使用oastackview
发布网友
发布时间:2022-04-26 00:26
我来回答
共1个回答
热心网友
时间:2023-10-24 15:00
接下来的例子演示了Flex中如何给ButtonBar添加一个ViewStack。
让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):
下面是完整代码(或点击这里察看):
Download: main.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http:// www. adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:ButtonBar id="buttonBar"
dataProvider="{viewStack}"
buttonHeight="32" />
<mx:ViewStack id="viewStack">
<mx:VBox label="Button"
icon="@Embed('assets/Button.png')"
backgroundColor="white"
width="480"
height="60">
<mx:Label text="Button..." />
</mx:VBox>
<mx:VBox label="ButtonBar"
icon="@Embed('assets/ButtonBar.png')"
backgroundColor="white"
width="480"
height="60">
<mx:Label text="ButtonBar..." />
</mx:VBox>
<mx:VBox label="CheckBox"
icon="@Embed('assets/CheckBox.png')"
backgroundColor="white"
width="480"
height="60">
<mx:Label text="CheckBox..." />
</mx:VBox>
<mx:VBox label="ColorPicker"
icon="@Embed('assets/ColorPicker.png')"
backgroundColor="white"
width="480"
height="60">
<mx:Label text="ColorPicker..." />
</mx:VBox>
</mx:ViewStack>
</mx:Application>
热心网友
时间:2023-10-24 15:00
接下来的例子演示了Flex中如何给ButtonBar添加一个ViewStack。
让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):
下面是完整代码(或点击这里察看):
Download: main.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http:// www. adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:ButtonBar id="buttonBar"
dataProvider="{viewStack}"
buttonHeight="32" />
<mx:ViewStack id="viewStack">
<mx:VBox label="Button"
icon="@Embed('assets/Button.png')"
backgroundColor="white"
width="480"
height="60">
<mx:Label text="Button..." />
</mx:VBox>
<mx:VBox label="ButtonBar"
icon="@Embed('assets/ButtonBar.png')"
backgroundColor="white"
width="480"
height="60">
<mx:Label text="ButtonBar..." />
</mx:VBox>
<mx:VBox label="CheckBox"
icon="@Embed('assets/CheckBox.png')"
backgroundColor="white"
width="480"
height="60">
<mx:Label text="CheckBox..." />
</mx:VBox>
<mx:VBox label="ColorPicker"
icon="@Embed('assets/ColorPicker.png')"
backgroundColor="white"
width="480"
height="60">
<mx:Label text="ColorPicker..." />
</mx:VBox>
</mx:ViewStack>
</mx:Application>