0

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

2 に答える 2

0

パネルのレイアウトが欠落していると思います。「fullscreen」プロパティをtrueに設定すると、パネルが表示されるはずです。

パネルのここhttp://vimeo.com/15879797に良いビデオチュートリアルがあります。

お役に立てば幸いです。今も煎茶を学んでいます!

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

          }
          });
于 2010-10-22T08:59:07.870 に答える
0

それでも Sencha Touch に問題がある場合は、次の Web サイトが非常に役立ちます: http://miamicoder.com/2011/writing-a-sencha-touch-application-part-1/

私自身、Sencha Touch アプリケーション開発の基本を学ぶために使用しました。writher はコードをよく説明し、localstorage、ナビゲーション、リストなどの基本的なものをプログラムする方法を示します。

于 2011-12-20T11:15:35.860 に答える