繁体   English   中英

在列表sencha touch下面显示面板

[英]Show panel below list sencha touch

我想将面板放置在列表下方,但似乎该面板始终位于列表上方。 我不想在列表上设置高度,因为它可能没有记录或20个记录,所以高度会有所不同。

我只是希望我的面板显示在列表的正下方 另请注意,我已禁用滚动。

 Rad.views.testList = Ext.extend(Ext.List, {
        fullscreen: true,
        layout: 'hbox',
        scroll: false,
        align: 'top',

        store: Rad.stores.test,

        itemTpl: Rad.views.testTemplate(),


    });


   topPanel = new Ext.Panel({
        fullscreen: true,
        scroll: true,
        layout: {
           type: 'vbox',
           pack: "start",
           align: "start"
        },
        defaults: {
           width: '100%',
        },
        items: [
            {
                layout: 'hbox',
                items: [testList]

            },
            {
                html: 'This will be on the list not below!'
        ]


   }); 

    Ext.apply(this, {
        layout: {
            type: 'vbox',
            pack : 'top',
        }, 
        dockedItems: [titlebar],
        items : [ topPanel]
    });

我应该一直在使用面板和数据视图。

var tpl = new Ext.XTemplate(
    '<tpl for=".">',
        '<div class="photosLocation">{pic}{name}',
        '</div>',
    '</tpl>'
);

var panel = new Ext.Panel({
    width:535,
    autoHeight:true,
    layout:'hbox',
    title:'Simple DataView',

    listeners: {
        click: {
            element: 'el', //bind to the underlying el property on the panel
            fn: function(){ alert('click'); }
        }
    },
    items: new Ext.DataView({
        store: Rad.stores.deals,
        tpl: tpl,
        autoHeight:true,
        itemSelector:'div.photosLocation',

    })
});

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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