0 0

关于ext.wiondw的隐藏5

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);

在Cancel button中this.hide(); 点Cancel就将按钮本身隐藏了,我想实现将Login这个Ext.Window隐藏,请问该如何做呢?
2008年6月23日 11:00

1个答案 按时间排序 按投票排序

0 0

采纳的答案

Login=function(){  
   var self=this;
    Login.superclass.constructor.call(this, {  
        .....
        .....
                        handler: function()  
                                {  
                                    self.hide();  
                                }  
                    }]  
                                                              
                                                }  
                                                        );  
                }  
 
Ext.extend(Login, Ext.Window); 


你试试这种写法。

2008年6月23日 15:48

相关推荐

Global site tag (gtag.js) - Google Analytics