Results 1 to 2 of 2

Thread: [Solved] : Problem with diplaying a container in tab

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Location
    France
    Posts
    44

    Default [Solved] : Problem with diplaying a container in tab

    Hello,

    I'm upgrading from ST 1 to ST2 and I don't undersant why my code doesn't work :
    It seems there is a problem with the var myContainer
    Code:
    Ext.application({
        name: 'Sencha',
        //prefetch les modules necessaires
        requires: ['Ext.TabPanel','Ext.carousel.Carousel','Ext.Container','Ext.Panel'],
        launch: function() {
    var magalerie =  {
      xtype:'carousel',
      items: [
            {style: 'background-color: #5E99CC' },
            {style: 'background-color: #759E60'},
            {style: 'background-color: #759E60'}
        ]
    };    
    var imagefixe={
        title: 'Image fixe',                    
        html: '<img src="http://staging.sencha.com/img/sencha.png" />'    
    };
    var myContainer={
        xtype:'container',                  
        layout:'vbox',
        defaults:{flex : 1},
        items: [magalerie,imagefixe]
    };
            /* cration des onglets */        
           Sencha.container = Ext.create("Ext.tab.Panel", {
                //don't forget fullscreen
                fullscreen: true,
                //positionne les onglets au dessus
                tabBarPosition: 'top',
                items: [myContainer,imagefixe]
            });       
        }
    });
    Can you help me to solve this problem ?

  2. #2
    Sencha User
    Join Date
    Jun 2010
    Location
    France
    Posts
    44

    Thumbs up Problem solved

    I solved the problem, since I catch the error in the DOM inspector :
    Adding a card to a tab container without specifying any tab configuration was missing the title property
    It was missing the title property in myContainer

    Code:
    var myContainer={
        xtype:'container',    
        title: 'My Title',
        layout:'vbox',
        defaults:{flex : 1},
        items: [magalerie,imageanimee]
    };

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
  •