views:

32

answers:

1

I want to create a panel using sencha.i tried the following code.but it doesn't works.

Ext.setup({
    icon: 'icon.png',
    tabletStartupScreen: 'tablet_startup.png',
    phoneStartupScreen: 'phone_startup.png',
    glossOnIcon: false,
    onReady: function() {


  var main = new Ext.Panel({  
        title: 'My first panel', //panel's title  
       width:250, //panel's width  
        height:300, //panel's height  
         //the element where the panel is going to be inserted 
        html: 'Nothing important just dummy text' //panel's content  
    });  
    main.render('frame');
    }
    });
A: 

I think you are missing a layout for your panel, if you set the "fullscreen" property to true then you should see your panel showing up.

There is a good video tutorial on panel's here http://vimeo.com/15879797.

Hope that helps, I'm just learning Sencha at the moment as well!

Ext.setup({
          icon: 'icon.png',
          tabletStartupScreen: 'tablet_startup.png',
          phoneStartupScreen: 'phone_startup.png',
          glossOnIcon: false,
          onReady: function() {


          var main = new Ext.Panel({  
                                   title: 'My first panel', //panel's title  
                                   fullscreen: true,
                                   //the element where the panel is going to be inserted 
                                   html: 'Nothing important just dummy text' //panel's content  
                                   });  

          }
          });
carok