ExtJS4.0学习笔记二
Ext.onReady(function() {
?
??var ProgressBar=new Ext.ProgressBar({
???width:300,
???renderTo:'ProgressBar1'
??});
??var count=0; //滚动条被刷新的次数
??var percentage = 0; //进度百分比
??var progressText = '';
??
??Ext.TaskManager.start({
???run:function(){
????count++;? //计算进度
????if(count > 10){
?????ProgressBar.hide();
??}
?????percentage = count/10; //生成进度条文字
?????progressText = '当前完成进度:' + percentage*100 + "%"; //更新信息提示对话框
?????ProgressBar.updateProgress(percentage,progressText,true);
????},
????interval:300,
????repeat:6
??});
});