ContainerLayout BorderLayout
Package: | Ext.layout |
Defined In: | BorderLayout.js |
Class: | BorderLayout |
Extends: | ContainerLayout |
This is a multi-pane, application-oriented UI layout style that supports multiple nested panels, automatic split bars between regions and built-in expanding and collapsing of regions.
This class is intended to be extended or created via the layout:'border' Ext.Container.layout config, and should generally not need to be created directly via the new keyword.
BorderLayout does not have any direct config options (other than inherited ones). All configuration options available for customizing the BorderLayout are at the Ext.layout.BorderLayout.Region and Ext.layout.BorderLayout.SplitRegion levels.
Example usage:
var myBorderPanel = new Ext.Panel({
renderTo: document.body,
width: 700,
height: 500,
title: 'Border Layout',
layout: 'border',
items: [{
title: 'South Region is resizable',
region: 'south', // position for region
height: 100,
split: true, // enable resizing
minSize: 75, // defaults to 50
maxSize: 150,
margins: '0 5 5 5'
},{
// xtype: 'panel' implied by default
title: 'West Region is collapsible',
region:'west',
margins: '5 0 0 5',
width: 200,
collapsible: true, // make collapsible
cmargins: '5 5 0 5', // adjust top margin when collapsed
id: 'west-region-container',
layout: 'fit',
unstyled: true
},{
title: 'Center Region',
region: 'center', // center region is required, no width/height specified
xtype: 'container',
layout: 'fit',
margins: '5 5 0 0'
}]
});
Notes:
wrc = Ext.getCmp('west-region-container');
wrc.removeAll();
wrc.add({
title: 'Added Panel',
html: 'Some content'
});
wrc.doLayout();
wr = myBorderPanel.layout.west;
Config Options | Defined By | |
---|---|---|
extraCls : String An optional extra CSS class that will be added to the container. This can be useful for adding
customized styles to t... An optional extra CSS class that will be added to the container. This can be useful for adding customized styles to the container or any of its children using standard CSS rules. See Ext.Component.ctCls also. Note: extraCls defaults to '' except for the following classes which assign a value by default:
| ContainerLayout | |
renderHidden : Boolean True to hide each contained item on render (defaults to false). | ContainerLayout |
Property | Defined By | |
---|---|---|
fieldTpl : Ext.Template The Ext.Template used by Field rendering layout classes (such as
Ext.layout.FormLayout) to create the DOM structure o... The Ext.Template used by Field rendering layout classes (such as
Ext.layout.FormLayout) to create the DOM structure of a fully wrapped,
labeled and styled form Field. A default Template is supplied, but this may be
overriden to create custom field structures. The template processes values returned from
Ext.layout.FormLayout.getTemplateArgs. | ContainerLayout | |
if : Object This monitorResize flag will be renamed soon as to avoid confusion
with the Container version which hooks onWindowRes... This monitorResize flag will be renamed soon as to avoid confusion
with the Container version which hooks onWindowResize to doLayout
monitorResize flag in this context attaches the resize event between
a container and it's layout | ContainerLayout |
Method | Defined By | |
---|---|---|
parseMargins( Number|String v )
:
ObjectParses a number or string representing margin sizes into an object. Supports CSS-style margin declarations
(e.g. 10, ... Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations
(e.g. 10, "10", "10 10", "10 10 10" and "10 10 10 10" are all valid options and would return the same result) Parameters:
| ContainerLayout |