Results 1 to 2 of 2

Thread: How to force a panel to overlap over other

  1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    50

    Default How to force a panel to overlap over other

    I am creating a panel with border layout as follows:

    Code:
    Ext.onReady(function() {
        Ext.create('Ext.panel.Panel', {
            width: 500,
            height: 200,
            title: 'Border Layout',
            layout: 'border',
            items: [
                {
                    title: 'North Region ',
                    region: 'north',     
                    xtype: 'panel',
                    height:50,
                },
                {
                    title: 'Center Region',
                    region: 'center',     
                    xtype: 'panel',
                    flex:1,
                    collapsed: true,
                    collapsible: true
                },
                 {
                    title: 'South Region',
                    region: 'south',     
                    xtype: 'panel',
                    layout: 'vbox',
                    flex:1,
                    items:[{
                        xtype: 'label',
                        text: 'Not Important'
                    },{
                        xtype: 'label',
                        text: 'Not Important'
                    },{
                        xtype: 'label',
                        text: 'Not Important'
                    },{
                        xtype: 'button',
                        text: 'Click'
                    }]
                }],
            renderTo: Ext.getBody()
        });
    });
    In this code whenever i am expanding the center panel, the south panel is being shifted towards bottom and thus the Button on the south panel is not visible.
    I am trying to do such that if I expands the center panel, it comes over the south panel instead of shifting it towards bottom, so that I can see the Button.

    Please suggest me any attribute of Panel that can help me.

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    574
    Answers
    59

    Default

    Border layout does not support such behavior. You want to try Accordion layout or make center item floating.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •