Reputation: 125
I want to make a status window displays some data, depending on the user's actions. How can I do so that the window after 10 seconds automatically hidden?
this.statusWin = new Ext.Window({
height: winHeight,
x: document.body.clientWidth - winWidth,
y: document.body.clientHeight - winHeight,
width: winWidth,
layout: 'fit',
items: status_message,
baseCls: 'lk-statusWindow',
hideBorder: false,
resizable: false,
closeAction: 'hide',
plain: true
});
Use ExtJs3.4
Upvotes: 2
Views: 463
Reputation: 3411
You can call a function with delay:
var closeWithDelay = new Ext.util.DelayedTask(function(){
this.statusWin.hide(); // or destroy
});
this.statusWin.on('show', function(){
closeWithDelay.delay(10000);
});
Upvotes: 2