如何使用sencha创建面板

问题描述 投票:0回答:2

我想使用sencha.i创建一个面板尝试了以下代码。但它不起作用。

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');
    }
    });
extjs sencha-touch
2个回答
0
投票

我认为你缺少面板的布局,如果你将“全屏”属性设置为true,那么你应该看到你的面板出现了。

面板上有一个很好的视频教程http://vimeo.com/15879797

希望有所帮助,我现在也只是学习Sencha!

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  
                                   });  

          }
          });

0
投票

如果您仍然遇到Sencha Touch的问题,以下网站真的很好:http://miamicoder.com/2011/writing-a-sencha-touch-application-part-1/

我自己用它来学习开发Sencha Touch应用程序的基础知识。该编写者很好地解释了代码,并展示了如何编写一些基本的东西,如本地存储,导航和列表。

© www.soinside.com 2019 - 2024. All rights reserved.