I want to create a list of progress bars and update the list accordingly.
I have group data in an Array as
<mx:Array id="arr">
<mx:Object label="Group One" min="0" max="200" currentValue="60" />
<mx:Object label="Group Two" min="0" max="300" currentValue="50" />
</mx:Array>
The values in the array object indicate name of group,minimum,maximum and current value
for the group (to be used in progressbar).
I used the list with “mx.controls.ProgressBar” as itemRenderer as
<mx:List width="100%" dataProvider="{arr}"
itemRenderer="mx.controls.ProgressBar"/>
Now what I need is whenever currentValue field of Array “arr” changes i want to update the progressbar “progress” value to currentValue (where min and maximum value of progressbar are stored in Array “arr”)
How can i do the same.
Thanks all
hi all
thanks for the answers..
After googling thr more I found something similar to what i need here
http://www.flex-blog.com/progressbar-in-datagrid-example/
Pretty similar to the 2 answers above.. by @kubarium and by @alxx ..
1. Use an ItemRenderer to show the ProgressBar inside the DataGrid .
2. Create a DataProvider for the DataGrid .
3. Create an action to start the ProgressBar
4. Make sure the ArrayCollection is updated on every progress of the
ProgressBar.