1. 程式人生 > >ext模態窗口

ext模態窗口

ext模態窗口

AddStandardSampleNoteWindow.superclass.constructor.call(this,{

layout:‘border‘,

id: ‘_addStandardSampleNoteWindow‘,

title:‘‘,

width:_width,

height:_height,

closeAction:‘close‘,

maximizable:true,

resizable :true,

constrain:true,

plain:true,

autoShow:false,

x:20,

y:window.screen.availHeight * 0.1,

items:[this.form,this.sampleNoteGridPanel],

plain: true,

modal : true,

//manager : new Ext.WindowGroup({‘z-seed‘ : 20000}),

plugins: new Ext.ux.WindowAlwaysOnTop(),

buttonAlign:‘center‘,

buttons : [

{ text : "保存", handler : this.onSave, scope :this, iconCls:‘saveIcon‘ },

{ text : "取消", handler : this.onCancel, scope : this , iconCls:‘cancelIcon‘},

‘->‘,

]

});

上述代碼中,標記為紅色的代碼為模態窗口的相關代碼。

modal:true,表示為模態窗口,

但如果加上第二行代碼,模態窗口可能會失效,第二行代碼用於控制該窗口的z坐標,z坐標值越大,窗口越靠前;

第三行代碼表示該窗口總是在最上層。

本文出自 “shihou” 博客,謝絕轉載!

ext模態窗口