Render Formpanel to a Tabpanel

109 Views Asked by At

I have two .js files with different ExtJS formpanels which I reander onReady() to a DIV in the HTML file:

myPanel.render( 'myDiv' );

I would like to add/render those to a tabpanel.

Is there a easy way to do this? And if so, how?

Thanks, Stef

1

There are 1 best solutions below

0
Francis Ducharme On

Like such ?

Ext.define('MyApp.view.MyTabPanel', {
    extend: 'Ext.tab.Panel',
    alias: 'widget.MyTabPanel',
    itemId: 'MyTabPanel',
    items: [
        {
            xtype: 'panel',
            title: 'Tab panel with the form',
            items: [myPanel] //the form panel
        }
    ]
});

//...

Ext.widget('MyTabPanel', { renderTo: 'myDiv'});