I have a 'vbox' panel as below,
{xtype:'panel',
id:'srchResPanel',
layout:'vbox',
scrollable:false,
items:[
{
xtype:'toolbar',
docked:'top',
height:46,
style:'border-top-left-radius:10px;',
title:'some title'
}
]}
I am trying to add 2 panels dynamically to the above panel, they are as below
var header = Ext.create('Ext.Panel', {
height:40,
width:'100%',
scrollable: {
direction: 'horizontal',
directionLock: true
},
layout:'hbox',
});
header.setHtml('<div style="font-size:15px;>header</div>');
and
var grid = Ext.create('Ext.Panel', {
width:'100%',
scrollable: {
direction: 'horizontal',
directionLock: true
},
layout:'vbox',
});
Ext.getCmp('srchResPanel').add(header);
Ext.getCmp('srchResPanel').add(grid);
when i add the above 2 panels to the top panel, only the first panel(header) is displayed the second panel(grid) is not getting displayed.
any help is appreciated. thanks in advance.
您还需要为第二个面板指定height
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.