[code="ruby"]LoginForm=function(){
Login.superclass.constructor.call(this, {
labelWidth: 75,
bodyStyle:'padding:0 5px 0',
width: 350,
border : false,
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: 'ID',
name: 'first',
allowBlank:false
},{
fieldLabel: 'Password',
name: 'last'
}
]
}
);
}
Ext.extend(LoginForm, Ext.FormPanel);
Login=function(){
Login.superclass.constructor.call(this, {
title:"login",
width:350,
border : false,
//height:300,
items:new LoginForm(),
buttons:[{
text: 'Login',
handler: function()
{
alert('login button');
}
},{
text: 'Cancel',
hideParent: true,
handler: function()
{
this.hide();
}
}]
}
);
}
Ext.extend(Login, Ext.Window);
[/code]
在Cancel button中this.hide(); 点Cancel就将按钮本身隐藏了,我想实现将Login这个Ext.Window隐藏,请问该如何做呢?