<?xml version="1.0"?>
<!-- Simple example to demonstrate the ProgressBar control. -->
<!--
如何使用Flex ProgressBar
MyShareBook.cn 翻译
-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private var j:uint=10;
// Event handler function to set the value of the
// ProgressBar control.
private function runit():void
{
if(j<=100)
{
bar.setProgress(j,100);
bar.label= "CurrentProgress" + " " + j + "%";
j+=10;
}
if(j>100)
{
j=0;
}
}
]]>
</mx:Script>
<mx:Panel title="ProgressBar Control Example" height="75%" width="75%"
paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
<mx:Label width="100%" color="blue"
text="Click the button to increment the progress bar." />
<mx:Button id="Speed" label="Run" click="runit();"/>
<mx:ProgressBar id="bar" labelPlacement="bottom" themeColor="#F20D7A"
minimum="0" visible="true" maximum="100" label="CurrentProgress 0%"
direction="right" mode="manual" width="100%"/>
</mx:Panel>
</mx:Application>
如何使用Flex ProgressBar
最新推荐文章于 2014-01-02 23:58:37 发布
本文介绍了一个简单的Flex进度条(ProgressBar)控件使用示例。通过按钮点击事件逐步更新进度条的值并显示当前进度百分比。该示例展示了如何设置进度条的基本属性,如方向、模式和颜色。
145

被折叠的 条评论
为什么被折叠?



