Mar 29

Flex中设置进度条(ProgressBar)完成时效果的例子中我们了解了如何设置进度条(ProgressBar)完成(100%)时的效果,接下来的例子演示了Flex中通过设置borderColor风格,设置ProgressBar进度条的边框颜色。

让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):



下面是完整代码:

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
  3.         layout="vertical"
  4.         verticalAlign="middle"
  5.         backgroundColor="white">
  6.  
  7.     <mx:ApplicationControlBar dock="true">
  8.         <mx:Form styleName="plain">
  9.             <mx:FormItem label="borderColor:">
  10.                 <mx:ColorPicker id="colorPicker" />
  11.             </mx:FormItem>
  12.         </mx:Form>
  13.     </mx:ApplicationControlBar>
  14.  
  15.     <mx:ProgressBar id="progressBar"
  16.             mode="manual"
  17.             labelPlacement="center"
  18.             borderColor="{colorPicker.selectedColor}"
  19.             height="50"
  20.             creationComplete="progressBar.setProgress(76, 100);" />
  21.  
  22. </mx:Application>
文中代码来自:flexexamples

written by Minidxer  |  tags: , , , ,

Related Post

One Response to “Flex中如何设置进度条(ProgressBar)边框颜色的例子”

Trackbacks

Leave a Reply