Omid Shariati
Omid Shariati

Reputation: 1916

ExtJs 4.2 layout: border gives me layout run fails

I have an html page and render a panel with layout: 'border' on it. I render it to a div with renderBody config. when I run the page I gives this error: layout run fails.

this is my ExtJs code

Ext.create('Ext.panel.Panel', {
    //width: 500,  // I want to fit this panel to parent element
                 //that i render this panel to it
    //height: 300, //
    title: 'Border Layout',
    layout: 'border',
    items: [{
        title: 'South Region',
        region: 'south',
        xtype: 'panel',
        height: 100
    },{
        // xtype: 'panel' implied by default
        title: 'West Region is collapsible',
        region:'west',
        xtype: 'panel',
        width: 200,
        id: 'west-region-container',
        layout: 'fit'
    },{
        title: 'Center Region',
        region: 'center',
        xtype: 'panel',
        layout: 'fit'
    }],
    renderTo: 'div-Id'
});

What should I do ?

Upvotes: 0

Views: 3192

Answers (1)

existdissolve
existdissolve

Reputation: 3124

Give you main panel a height...this will resolve the issue. See here for an example: https://fiddle.sencha.com/#fiddle/ma

Upvotes: 4

Related Questions