我想添加窗口最大化的事件,但不知怎样写,也就是
id:'maximize',
handler: function(e, target, panel){

}
}
中该如何添加事件,在网上查有个maximizable:true属性,但我设置了没什么效果,完整代码如下所示 Ext.onReady(
function(){
var items = [];
var tools = [{
        id:'maximize',
        handler: function(e, target, panel){
panel.ownerCt.maximizable=true;
}
},{
id:'close',
handler: function(e, target, panel){
panel.ownerCt.remove(panel, true);
}
}]; var viewport = new Ext.Viewport({
        items:[{
            xtype:'portal',
            region:'center',
            margins:'35 5 5 0',
            items:[{
                columnWidth:.33,
                style:'padding:10px 0 10px 10px',
maximizable:true,
                items:[{
                    title: 'Panel 2',
                    tools: tools,
                    html: Ext.example.shortBogusMarkup
                },{
                    title: 'Another Panel 2',
                    tools: tools,
                    html: Ext.example.shortBogusMarkup
                }]
            },{
                columnWidth:.33,
                style:'padding:10px',
                items:[{
                    title: 'Panel 3',
                    tools: tools,
                    html: Ext.example.shortBogusMarkup
                },{
                    title: 'Another Panel 3',
                    tools: tools,
                    html: Ext.example.shortBogusMarkup
                }]
            }]
        }]
    });
}
);

解决方案 »

  1.   

    我设置其他属性都可以   但就最大化这个属性不行  没效果
    MyDesktop.GridWindow13 = Ext.extend(Ext.app.Module, {
        id:'grid-win13',
        init : function(){
            this.launcher = {
                text: '小工具',
                iconCls:'icon-grid',
                handler : this.createWindow,
                scope: this
            }
        },
        createWindow : function(){
            var desktop = this.app.getDesktop();
            var win = desktop.getWindow('grid-win13');
            if(!win){
                win = desktop.createWindow({
                    id: 'grid-win13',
                    title:'小工具',
                    width:512,
                    height:384,
                    iconCls: 'icon-grid',
                    shim:true,
                    animCollapse:true,
                    constrainHeader:false,
                    maximizable:true,//////禁用最大化按钮
                    layout: 'fit',
                    items:[{             html: "<IFRAME id='schfrm' name='schfrm' target='main' width=100% height=100% SRC = '/msa/desktop/tool/tool.html'  border='0' frameborder='0' scrolling='yes'></iframe>"
                          }]
                });
            }
            win.show();
            win.maxinizable=false;
        }
    });
      

  2.   

    失误 
    MyDesktop.GridWindow13 = Ext.extend(Ext.app.Module, {
      id:'grid-win13',
      init : function(){
      this.launcher = {
      text: '小工具',
      iconCls:'icon-grid',
      handler : this.createWindow,
      scope: this
      }
      },
      createWindow : function(){
      var desktop = this.app.getDesktop();
      var win = desktop.getWindow('grid-win13');
      if(!win){
      win = desktop.createWindow({
      id: 'grid-win13',
      title:'小工具',
      width:512,
      height:384,
      iconCls: 'icon-grid',
      shim:true,
      animCollapse:true,
      constrainHeader:false,
      maximizable:false,//////禁用最大化按钮
      layout: 'fit',
      items:[{ html: "<IFRAME id='schfrm' name='schfrm' target='main' width=100% height=100% SRC = '/msa/desktop/tool/tool.html' border='0' frameborder='0' scrolling='yes'></iframe>"
      }]
      });
      }
      win.show();
      }
    });