Results 1 to 2 of 2

Thread: [panel] - nest a 100% height BorderLayout inside a VboxLayout

  1. #1
    Sencha User toni07's Avatar
    Join Date
    Oct 2013

    Default [panel] - nest a 100% height BorderLayout inside a VboxLayout

    Hi all,

    I am trying to put a BorderLayout inside a VBoxLayout, and having this BorderLayout a 100% height.
    I try:
    Ext.create('Ext.container.Viewport', {
        layout : 'fit',
        items : [
            Ext.create('Ext.panel.Panel', {
                width: '100%',
                layout: {
                    type: 'vbox',
                    align: 'stretch'
                items: [
                    Ext.create('Ext.panel.Panel', {
                        flex: 0,
                        height: 200,
                        layout: 'border',
                        items: [
                            Ext.create('Ext.panel.Panel', {
                                title: 'toto',
                                region: 'center'
    It works well, but if I replace height: 200 with height:'100%', I do not see anything.
    What I am doing wrong?

    Thanks for your help!

    (ps: The VBoxLayout is a requirement, my application is much more complex that this example, and I cannot change the VBoxLayout).

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010


    Rather than setting height: '100%' could you set flex: 1? Using a percentage in the primary axis of a box layout isn't supported (you could use a percentage for the secondary axis, width for a vbox, height for an hbox).

Tags for this Thread

Posting Permissions

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