在Ext.window中添加进度条 [英] Add progressbar inside Ext.window
本文介绍了在Ext.window中添加进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以帮助我在Ext.window的进度栏下方插入吗?或在Ext.window内添加进度条的任何其他建议?
Could anyone help me insert below progress bar inside Ext.window? or any other suggestions to add a progress bar inside Ext.window?
var p = Ext.create('Ext.ProgressBar', {
renderTo: Ext.body(),
width: 300
});
p.wait({
interval: 500, //bar will move fast!
duration: 50000,
increment: 100,
text: 'Updating',
scope: this,
fn: function () {
p.updateText('Done!');
}
});
我想在窗口下方插入进度条
I want to insert progress bar in below window
var window = new Ext.Window({
title: "export",
height: 100,
layout: 'fit',
buttons: [
{
text: 'Cancel',
listeners: {
click: function () {
window.close();
}
}
}
],
items: [{
xtype: 'download',
autoEl: {
tag: 'iframe',
src: 'www.google.com'
}
}]
}).show();
推荐答案
您有多种方法可以做到这一点.您可以将现有进度条添加到现有窗口中:
You have multiple ways to do that. You could add the existing progress bar to the existing window:
window.add(p);
或在创建窗口时添加现有的进度条:
Or add the existing progress bar when creating the window:
new Ext.Window({
items: [p]
);
或在创建窗口时创建一个新的进度条:
Or create a new progress bar when creating the window:
new Ext.Window({
items: [{
xtype: 'progressbar'
}]
);
这篇关于在Ext.window中添加进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文