繁体   English   中英

面板未显示sencha touch 2

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM