EXT JS Progressbar

时间:2014-02-03 18:24:06

标签: javascript extjs

我有一个进度条如下。 我想在progessbar上方显示进度文本。 怎么做到这一点?

以下是我想要的进度条图像。

             {
                 xtype : 'progressbar',
                 itemId : 'progressbar_searchresults',
                 width : 160,
                 style: {
                     color: 'green'
                 },
                 hidden : true,
                 textEl : 'progressbar_textElement'
             }

enter image description here

1 个答案:

答案 0 :(得分:0)

在我看来,

方式一:

Panel
[{
item1 is lable(completed 10%)
},
{
progress-bar(10%)
}]

即使进度条的状态发生了变化,您也需要更改标签的值。

方式二:

或者您可以使用text属性在进度条上显示文本  您需要在侦听器中添加以下事件

update( this, value, text, eOpts )

Fires after each update interval

Parameters
this : Ext.ProgressBar
value : Number //The current progress value
text : String  //The current progress text
eOpts : Object //The options object passed to Ext.util.Observable.addListener.
相关问题