1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    5
    Answers
    1
    Vote Rating
    0
    ninjasenses is on a distinguished road

      0  

    Default Answered: How to put a list next to a panel horzontally?

    Answered: How to put a list next to a panel horzontally?


    I have been trying to put a list next to a panel using an hbox container but I have had no luck, everything i have tried causes the list to come up blank. the store has items in it, but there is just a white area whenever it loads. The panel next to it loads fine though. The weird thing that is that when I run my test app in sencha fiddle it shows up how it should, yet locally it does not show correctly. Anyone know whats up? I am using sencha 2 locally.

    http://www.senchafiddle.com/#xTZZg#yXGJ4

    Code:
    Ext.Loader.setConfig({
        enabled: true
    });
    
    
    Ext.application({
        name: 'SenchaFiddle',
        
        launch: function() {
            Ext.Viewport.add(contain2);
        }
    });
    var testData = [];
    for (var i = 0; i < 40; i++)
    { testData.push({ txt: "test" }); }
    
    
    var storesdasd = Ext.create('Ext.data.Store', {
        data: testData
    });
    
    
    var contain2 = Ext.create('Ext.Container', {
        layout: {
            type: 'hbox',
            align: 'stretch'
        },
        title: 'Schedules',
        iconCls: 'time',
        
        items: [{
            xtype: 'list',
            itemTpl: '{txt}',
            store: storesdasd,
            flex: 3
        }
                
                , {
                    html: 'message preview',
                    style: 'background-color: #759E60;',
                    flex: 1
                }],
        config: {
            title: 'Schedules',
            iconCls: 'time'
        }
    });

  2. Create your components within the launch method.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,347
    Answers
    3542
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Create your components within the launch method.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Feb 2013
    Posts
    5
    Answers
    1
    Vote Rating
    0
    ninjasenses is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    Create your components within the launch method.
    Is there a way to do this outside of the launch method? I was only using this example as a small scale test, A more complete example can be found here: http://stackoverflow.com/questions/1...-an-hbox-panel

Thread Participants: 1

Tags for this Thread