0

リストパネルのタイトルを動的に変更するにはどうすればよいですか? リストパネルがアイテムであるナビゲーションビューがあります。したがって、ナビゲーション バーには、動的に変更されるパネル タイトルが表示されます。

画像: http://postimage.org/image/evxdv8fh9/

ありがとう。

listpanel = new Ext.Panel({
                       layout: 'fit',   
                       id:'listpanel',
                       title:'change this title dinamically',
                       items: [
                               {
                                   xtype: 'titlebar',
                                   id: 'myTitle',
                                   docked: 'top',
                                   title: 'title1'
                               },
                               { xtype: 'titlebar',
                                   id: 'myMeanConsumption',
                                   docked: 'bottom',
                                   title: 'title2'
                               },
                                   list
                               ]
                   });
4

2 に答える 2

0

リストパネルの作成後にこれを追加します。

listpanel.onAfter('painted', function () { 
listpanel.getNavigationBar().setTitle(newTitle); },  listpanel, { delay: 100 });
于 2012-06-26T19:08:39.467 に答える