1. #1
    Sencha User sunrong's Avatar
    Join Date
    Jun 2010
    Posts
    35
    Vote Rating
    0
    sunrong is on a distinguished road

      0  

    Default how to add treePanel to a viewport

    how to add treePanel to a viewport


    Code:
    Ext.create('Ext.container.Viewport', {
            layout: 'border',
            items: [{
                region: 'north',
                html: '<h1 class="x-panel-header">Page Title</h1>',
                autoHeight: true,
                border: false,
                margins: '0 0 5 0'
            }, {
            region: 'west',
            collapsible: true,
            title: 'Navigation',
            width: 150,
            items: tree
            },......
    Code:
    var tree = Ext.create('Ext.tree.Panel', {
            store: store,
            viewConfig: {
                plugins: {
                    ptype: 'treeviewdragdrop'
                }
            },
            region:'west',
           contentEl:'west',
          id:'west-panel',
            layout:'accordion',
            height: 300,
            width: 250,
            title: 'function',
            useArrows: true,
            dockedItems: [{
                xtype: 'toolbar',
                items: [{
                    text: 'Expand All',
                    handler: function(){
                        tree.expandAll();
                    }
                }, {
                    text: 'Collapse All',
                    handler: function(){
                        tree.collapseAll();
                    }
                }]
            }]
        });
    the code does not work?how to fix it? Thanks!
    sun

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Try to fix your code as below:
    Code:
    var tree = Ext.create('Ext.tree.Panel', {
        store: store,
        viewConfig: {
            plugins: {
                ptype: 'treeviewdragdrop'
            }
        },
    //  region:'west',
    //  contentEl:'west',
        id:'west-panel',
    //  layout:'accordion',
        height: 300,
        width: 250,
        title: 'function',
        useArrows: true,
        dockedItems: [{
            xtype: 'toolbar',
            items: [{
                text: 'Expand All',
                handler: function(){
                    tree.expandAll();
                }
            }, {
                text: 'Collapse All',
                handler: function(){
                    tree.collapseAll();
                }
            }]
        }]
    });

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi