Results 1 to 3 of 3

Thread: Using vbox layout

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default Using vbox layout

    Hi, Im new in sencha touch 2.2.1 and Im trying to use vbox layout. Here is the code:

    App.js
    Code:
    Ext.Loader.setPath({
        'Ext': 'touch/src'
    });
    //</debug>
    
    
    Ext.application({
        name: 'TP',
    
    
        views: [
            'Main'
        ],
    
    
        launch: function() {
            // Destroy the #appLoadingIndicator element
            Ext.fly('appLoadingIndicator').destroy();
    
    
            // Initialize the main view
            Ext.Viewport.add(Ext.create('TP.view.Main'));
        }
    
    
    });
    Main.js
    Code:
    Ext.define('TP.view.Main', {
        extend: 'Ext.Panel',
        xtype: 'main',
        requires: [
            'Ext.TitleBar'
        ],
    
    
        config: {
            layout: 'vbox',
            items:[
                {
                    style: 'background-color:#999999;',
                    flex: 1
                },
                {
                    style: 'background-color:#666666;',
                    flex: 3,
                }
            ]
    
    
        }
    });
    The problem is that I cant see the division that I made using vbox layout, I only see a white background...

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Answers
    102
    Vote Rating
    86
      0  

    Default

    add "fullscreen : true" to your TP.view.Main's config block.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default

    jay I add the fullscreen property and it didnt work, but I test the same code in safari and it works just fine, but I cant understand why isnt working in chrome...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •