日期:2014-05-17 浏览次数:20694 次
insert( Number index, Ext.Component component ) : Ext.Component Inserts a Component into this Container at a specified index. Fires the beforeadd event before inserting, then fires ... Inserts a Component into this Container at a specified index. Fires the beforeadd event before inserting, then fires the add event after the Component has been inserted. Parameters: * index : Number The index at which the Component will be inserted into the Container's items collection * component : Ext.Component The child Component to insert. Ext uses lazy rendering, and will only render the inserted Component should it become necessary. A Component config object may be passed in order to avoid the overhead of constructing a real Component object if lazy rendering might mean that the inserted Component will not be rendered immediately. To take advantage of this "lazy instantiation", set the Ext.Component.xtype config property to the registered type of the Component wanted. For a list of all available xtypes, see Ext.Component. Returns: * Ext.Component component The Component (or config object) that was inserted with the Container's default config values applied.
{ text : ' 返 回 ', handler : function() { //newFormWin.hide(); var one = new Ext.form.TextField({value : 'one', name : 'one', fieldLabel: 'one' }); form1.items.add(one); form1.render(); } }