PDA

View Full Version : hbox layout and align strech



gkatz
5 Jan 2011, 11:53 PM
Hi;
It seems like using a strech property on with hbox layout does not strech the items vertically as it is supposed to. (using v1.0.1). note that if you just change the layout type of the root container in the code to 'vbox' the items strech to fill the container like they are supposed to.
can someone please take a quick look to see what I am missing?

simple code:


Ext.setup({
icon: 'icon.png',
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
glossOnIcon: false,
onReady: function() {


var root = new Ext.Panel({
fullscreen: true,
style: 'background-color:green;',
layout:{
type:'hbox',
align: 'strech'

},
defaults:{flex:'1'},
items: [
{
xtype: 'panel',
html: 'left',
style: 'background-color:red;',
},
{
xtype: 'panel',
html: 'right',
style: 'background-color:orange;',
}
]
});
}
});

gkatz
10 Jan 2011, 10:53 PM
bumped;
cant get past this simple issue.
the API for hbox layout states:


stretch : Components are stretched vertically to fill the container.

yet the items do not strech vertically to fill it - they just strech for the height needed to display the items html.
ahy help would be great.
thanks

evant
10 Jan 2011, 10:58 PM
align: 'stretch'

gkatz
10 Jan 2011, 11:02 PM
F@#$ me...
thanks Evant, will try to post more meaningfull stuff next time :)

AlexFirejack
6 Dec 2012, 5:11 AM
..."the items do not stretch vertically to fill it"... But if I need vise versa?(need to fill all spases)