2

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

4

1 回答 1

2

您可以延迟调用函数:

var closeWithDelay = new Ext.util.DelayedTask(function(){
    this.statusWin.hide(); // or destroy
});

this.statusWin.on('show', function(){
    closeWithDelay.delay(10000); 
});
于 2013-10-08T07:33:25.303 回答