Results 1 to 3 of 3

Thread: Border Layout Weight configuration

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2010
    Posts
    49
    Vote Rating
    0
      0  

    Question Border Layout Weight configuration

    In the PR1 blog entry, Don mentioned this:
    You could not configure the layout such that an east or west region had priority over a north or south region. To achieve this, again, you needed to use nested border layouts.
    Does this mean that we can now have a layout like this without using nested border layouts:
    Code:
    [      |         |      ]
    [      |         |      ]
    [ East | Center  | West ]
    [      |---------|      ]
    [      |  South  |      ]
    I.E where the East and West regions overlay the south region? If so, how do we go about configuring it that way? I tried to take a look at the source changes but couldn't quite grasp it.

    Thanks,
    Tim

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1381
      0  

    Default

    Check this out:

    Code:
    Ext.create('Ext.panel.Panel', {
        renderTo : Ext.getBody(),
        width    : 400,
        height   : 400,
        layout   : 'border',
        items    : [
            {
                title  : 'West',
                region : 'west',
                width  : 100,
                weight : -1
            },
            {
                title  : 'East',
                region : 'east',
                width  : 100,
                weight : -1
            },
            {
                title  : 'South',
                region : 'south',
                height : 100,
                weight : -2
            },
            {
                title  : 'Center',
                region : 'center'
            }
        ]
    });
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2010
    Posts
    49
    Vote Rating
    0
      0  

    Default

    Sweet, thanks!

Posting Permissions

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