2013-02-20 2 views

답변

0
Ext.define('DoubleCombo', { 
    extend: 'Ext.Panel', // or Ext.Component e.t.c 
    alias: 'widget.doubleCombo', 
    items: [{ 
     xtype: 'combobox', 
     ... 
    },{ 
     xtype: 'combobox', 
     ... 
    }] 
}); 

그리고 xtype : 'doubleCombo'를 사용할 수 있습니다. 구성 요소에 대한 가이드보기 : http://docs.sencha.com/ext-js/4-1/#!/guide/components

0
Ext.define('MyApp.view.MyContainer', { 
    extend: 'Ext.container.Container', 
    alias:'widget.myxtype', 

    initComponent: function() { 
     var me = this; 

     Ext.applyIf(me, { 
      items: [ 
       { 
        xtype: 'combobox', 
        fieldLabel: 'Label' 
       }, 
       { 
        xtype: 'combobox', 
        fieldLabel: 'Label' 
       } 
      ] 
     }); 

     me.callParent(arguments); 
    } 
}); 
관련 문제