在flex中加载进度条
下面的代码有什么问题,我只得到加载进度条。
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2009/02/01/setting-the-bar-color-on-the-progressbar-control-in-flex/ -->
<mx:Application name="ProgressBar_barColor_test"
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Script>
<![CDATA[
import mx.events.ColorPickerEvent;
private function colorPicker_change(evt:ColorPickerEvent):void {
progressBar.setStyle("barColor", evt.color);
}
]]>
</mx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Form styleName="plain">
<mx:FormItem label="barColor:">
<mx:ColorPicker id="colorPicker"
selectedColor="red"
change="colorPicker_change(event);" />
</mx:FormItem>
</mx:Form>
</mx:ApplicationControlBar>
<mx:ProgressBar id="progressBar"
indeterminate="true"
labelPlacement="center"
height="100" />
</mx:Application>
What is wrong with the following code,I get the progress bar as loading only.
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2009/02/01/setting-the-bar-color-on-the-progressbar-control-in-flex/ -->
<mx:Application name="ProgressBar_barColor_test"
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Script>
<![CDATA[
import mx.events.ColorPickerEvent;
private function colorPicker_change(evt:ColorPickerEvent):void {
progressBar.setStyle("barColor", evt.color);
}
]]>
</mx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Form styleName="plain">
<mx:FormItem label="barColor:">
<mx:ColorPicker id="colorPicker"
selectedColor="red"
change="colorPicker_change(event);" />
</mx:FormItem>
</mx:Form>
</mx:ApplicationControlBar>
<mx:ProgressBar id="progressBar"
indeterminate="true"
labelPlacement="center"
height="100" />
</mx:Application>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过“加载”,我假设您的意思是进度条没有显示任何特定的进度。这是因为您将进度条设置为不确定,这意味着它不会显示进度,而只会以动画形式通知用户进度正在发生,但不会达到任何具体数量。
By "loading" I am assuming you mean the progress bar is not displaying any sort of specific progress. This is because you have the progress bar set as indeterminate, meaning it won't show progress, but will just animate to notify the user that progress is occurring but not by any specific amount.