Layout ContainerLayout BoxLayout HBoxLayout
Package: | Ext.layout |
Defined In: | BoxLayout.js |
Class: | HBoxLayout |
Extends: | BoxLayout |
A layout that arranges items horizontally across a Container. This layout optionally divides available horizontal
space between child items containing a numeric flex
configuration. The flex option is a ratio that
distributes width after any items with explicit widths have been accounted for. In the code below, the width is calculated
as follows:
new Ext.Container({
width: 400,
height: 300,
layout: {
type: 'hbox',
align: 'stretch'
},
items: [{
flex: 2,
html: 'First'
},{
width: 100,
html: 'Second'
},{
flex: 1,
html: 'Third'
}]
});
This layout may also be used to set the heights of child items by configuring it with the align option.Config Options | Defined By | |
---|---|---|
align : String Specifies the vertical alignment of child components. Defaults to 'center'. Acceptable values are:
center : <div cla... Specifies the vertical alignment of child components. Defaults to 'center'. Acceptable values are:
| HBoxLayout | |
direction : String Specifies the direction in which child components are laid out. Defaults
to 'normal', which means they are laid out i... Specifies the direction in which child components are laid out. Defaults
to 'normal', which means they are laid out in the order they are added. You can use the
'reverse' option to have them laid out in reverse. | BoxLayout | |
itemCls : 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. | ContainerLayout | |
pack : String Specifies the horizontal alignment of child components. Defaults to 'start'. Acceptable values are:
center : <div cl... Specifies the horizontal alignment of child components. Defaults to 'start'. Acceptable values are:
| HBoxLayout |
Method | Defined By | |
---|---|---|
getLayoutItems()
:
Array Returns an array of child components. Returns an array of child components. Parameters:
| ContainerLayout | |
getTarget()
:
Ext.Element Returns the owner component's resize element. Returns the owner component's resize element. Parameters:
| ContainerLayout |