Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Collapsing nested borderlayout panel in anchorlayout panel in Ext.Viewport

I start to learn Ext and stuck with such problem. I have a viewport with code

Ext.define('WIMM.view.Viewport', {
extend: 'Ext.container.Viewport',
autoScroll: true,
layout: 'anchor',
items: [
    {
        border: false,
        title: 'Header',
        layout: 'fit',
        xtype: 'container',
        html: 'Header block. We\'ll try to do this again'
    },{
        layout: 'border',
        items: [
            {
                collapsible: true,
                width: 240,
                title: 'Aside Column',
                region:'west',
                layout: 'fit',
                html: 'Aside widgets (news, balance, budget, goals) would be here.'
            },{
                title: 'Main Block',
                border: false,
                region:'center',
                layout: 'fit',
                html: 'Main block were tabPanel would be nested in.'
            }
        ]
    },{
        title: 'footer',
        xtype: 'container',
        layout: 'fit',
        html: 'Some information in footer (copyrights, disclaimer link)'
    }
]
});

But item with border layout shrinks and only 1px border of that block is visible. It's important for me to have scrollBar, so I can't use border layout for entire viewport. Please help me to solve that issue

like image 826
vitalii-patsai Avatar asked Oct 13 '12 13:10

vitalii-patsai


1 Answers

You have to set the height of the panel with the border layout.

{
    layout: 'border',
    height: 100,
    items: [
        {
        collapsible: true,
        width: 240,
        title: 'Aside Column',
        region: 'west',
        layout: 'fit',
        html: 'Aside widgets (news, balance, budget, goals) would be here.'},
    {
        title: 'Main Block',
        border: false,
        region: 'center',
        layout: 'fit',
        html: 'Main block were tabPanel would be nested in.'}
    ]
}

Look at this: http://jsfiddle.net/3CabN/4/

like image 145
Darin Kolev Avatar answered Sep 30 '22 08:09

Darin Kolev