PDA

View Full Version : 'vbox' Layout does not rendered correctly



soulgen
6 Apr 2010, 10:29 PM
I notice this error right after upgrading from 3.1.1 to 3.2.0.
To ensure myself, I downgrading from 3.2.0 to 3.1.1 again, and the layout is back to normal.

Here is the codes:


Ext.onReady(function() {

/*
* Creating viewport to be a container for all components
*
*/
var companyViewport = new Ext.Viewport({
id: 'companyViewport'
,layout: 'border'
,items: [
{
region: 'north'
,cls: 'x-panel-header'
,contentEl: 'header'
,height: 75
,bbar: [
' '
,' '
,{
xtype: 'label'
,id: 'loggedin_user'
,text: 'blahblahblah'
}
,'->'
,{
text: 'Logout'
,handler: function() {
document.location.href = 'login.view.php'
}
}
]
}
,{
region: 'south'
,title: 'blahblahblah'
,html: 'blahblahblah'
,style: 'text-align: center;'
,bodyStyle: 'text-align: right;'
,frame: true
}
,{
region: 'east'
,collapsible: true
,width: 235
,layout: 'vbox'
,items: [
{
title: 'News and Events'
,flex: 1
,html: 'blahblahblah'
,bodyStyle: 'padding: 5px; font: normal 11px Verdana;'
,autoScroll: true
}
,{
title: 'Advertisement'
,flex: 1
,html: 'blahblahblah'
,bodyStyle: 'text-align: center;'
,autoScroll: true
}
]
}
,{
region: 'center'
,layout: 'fit'
,items: [
{
title: 'blahblahblah'
//,items: companySpbuChart
}
]
}
]
});

// re-paint the viewport, so any dynamic components rendered correctly
companyViewport.doLayout();

// Check wether the page successfully rendered
if (companyViewport.rendered) {
Ext.Msg.alert('Success', companyViewport.id + ' is completely rendered');
}

});


I also attach 2 files: screenshot from 3.1.1 and from 3.2.0 (I give it a red circle to mark the error)

evant
6 Apr 2010, 10:50 PM
This isn't a bug. You need to use the align: 'stretch' option.

Moving to help.

soulgen
7 Apr 2010, 12:02 AM
then why I don't need added the align: 'stretch' option in the Ext-3.1.1?