PDA

View Full Version : 2 ListView render issues



OmEgBuLe
28 Nov 2011, 9:28 AM
Hi i'm having issues with getting two list views to display side by side. What I get from the following code is one of the list views displaying but the listview that is supposed to be next to it does not display. The border for the panel shows up where the listview is supposed to be. Help is greatly appreciated though.



var frmBook = new Ext.FormPanel({
height: 240,
width: 660,
layout: 'hbox',
title: '',
items: [
{
xtype: 'form',
height: 220,
width: 320,
title: '',
layout: 'fit',
items: [
{
xtype: 'listview',
columnResize: false,
columns: [
{
xtype: 'lvcolumn',
header: 'Report',
width: 0.25
}
]
}
]
}, {
html: '',
border: false,
width: 200,
bodyBorder: false
}, {
xtype: 'panel',
height: 220,
width: 320,
title: '',
layout: 'fit',
items: [
{
xtype: 'listview',
columnResize: false,
columns: [
{
xtype: 'lvcolumn',
header: 'Report',
width: 0.25
},
{
xtype: 'lvcolumn',
header: 'Bookmarked'
}
]
}
]
}
]
})

mitchellsimoens
28 Nov 2011, 11:47 AM
To get two things side by side you should use hbox layout with align : 'stretch' and flex : 1 on the children. And then on the children you should specify the height or width unless you want to explicitly set the size.

OmEgBuLe
29 Nov 2011, 9:08 AM
Thank you