[英]panel not displayed sencha touch 2
我有一個如下所示的“ vbox”面板,
{xtype:'panel',
id:'srchResPanel',
layout:'vbox',
scrollable:false,
items:[
{
xtype:'toolbar',
docked:'top',
height:46,
style:'border-top-left-radius:10px;',
title:'some title'
}
]}
我正在嘗試將2個面板動態添加到上面的面板中,它們如下
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>');
和
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);
當我將上述2個面板添加到頂部面板時,僅顯示第一個面板(標題),而第二個面板(網格)未顯示。
任何幫助表示贊賞。 提前致謝。
您還需要為第二個面板指定height
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.